Add setup $gmEvents on bootstrap with some additional cosmetic fixes.