Update Main.js

little fixes, see changes