fixes and improvements. Page factory.