Add jsHint and tidy up code.