JSHint fixes

Fix all JSHint problems and make it pass
```json
{
    "browser": true,
    "debug": false,
    "devel": false,
    "strict": true,
    "undef": true,
    "unused": true,
    "jquery": true,
    "curly": true,
    "eqeqeq": true,
    "forin": true,
    "freeze": true,
}
```