Cleaned up code with jshint