More linting fixes

- Improve CSS selector performance
- Removed unused variables
- Fix dangerous comparison operators