Refactored page_parts queries