Update main.js

Got an error about parenthesis.  Added some spacing to make everything easier to understand and corrected error.