cleanups and completing the pages