small tweaks and changes to main.js