Adds JSHint and some formatting fixes