Small fixes, thinning out main.js.