Update main.js

Attempts to maintain the current indent level while still eliminating extraneous whitespace