Fixed jshint warnings (var declarations, missing or extra semicolons)