cleaning up the page handler code... but still debugging.