a lot of js cleanup, thanks to actual linting.