Move stuff from main.js