Split up JS logic into testMain.js... leaving main.js, but probably not using it anymore once everythig is ported over.