Made Codex.getPage be smarter about locations and have the end of layout restore the current state rather than doing a direct GOTO
Revamped application state maintenance
Updated initLocation to use new state stuff