Also added some comments and improved the documentation.
Attach a file by drag & drop or click to upload