Fix various code inspections.

- Removed unused imports
- Removed redundant code (return statements, semicolons, parenthesis etc)
- Replaced vars with vals
- more minor changes