Fix some of JSHint findings
Refactor to use module pattern on image upload object, so I can refactor it