Fix JSHint and existing lint errors