Update main.js

Lite commenting added and exception handling added to addMarkers().
Still more commenting and exception handling needed.