Improved creation of page fields - proper checking of parent_id and template_id when finding the parent page. Also a few more notice error fixes.