cleaned up main.js