move stuff around a bit in main.js