Made it a bit more JSHint friendly

Removed extra semicolons, changed an already defined variable, small stuff to made it more JSHint (http://www.jshint.com/) friendly