Resolve some simple warnings detected by JSHint