Some quick fixes to make it pass JSHint