When closing, the PageManager now truncates unused pages at the end and reduces the file size
Improved naming consistency (renamed page_size/page_id to pagesize/pageid)
Minor refactoring in PageManager, no functional changes but improved error checks