Linted everything with JSHint. Added precommit hook.