Cleans up JS

Adds some JS cleanup according to JSHint. Removes unused method, long
line length, mixed quotes, redundant variable declaration, and missing
semicolon.