The code is much easier to follow now, and I bet it's faster too.
Attach a file by drag & drop or click to upload