Further refinement of JS/DOM.
Renamed mainG.js to main.js