Cleans up main.js