Cleaned up style

generic stuff like semicolons and `x == 0` ambiguities (jshint)