addressed a bunch of stuff brought up by JSHint