implemented a less boneheaded method of switching page render mode (home/sub)