Lots of changes to main.js, didnt commit till i knew i wanted to change