Define JSHint configuration on .jshintrc and validate the code

Use stopSpinner in more places