Started using WebStorm and removed most of the warnings on main.js