some code cleanup, added page numbers to page titles