Refactored the comparison function to be more DRY and use constants.
Attach a file by drag & drop or click to upload