Post-merge code formatting for code consistency. Minor code cleanup.
Moved gold property to ig.global scope. Modified all references to old gold property accordingly.
Converted 'ig.game' to 'this' in main.js where applicable.