Applied the suggested corrections from JSlint that made sense.
Added a minified file