Formatting and other minor changes

Used JSHint to check for needed improvements