Cleaned up main.js.