fix indentation and jshint errors