fixed bug where app.phase() executed on page load
added debug menu
consolidated app.phaseOne, et al methods into app.phase(i)