Update main.js

Generation and stuff