Update main.js

tabbed in code that will be removed once I improve the map editor