started migrating page logic out of draw