Fixing JSHint errors