JSHint and other cleanups