Refactored js file from random collection of functions to more OO approach.
Updated file input to only accept images.