Refactor page_path