clean up code above qw_page_delete