Fixing JSHint warnings