misc clean up. simplify page handling