Fixed JSHint errors so that it can be turned on in Travis