ability to delete pages and some code improvements