fixed indentation, and a few jshint errors which came up