Factored out the concept of PageFactory

Actually results in more lines of code, but much less coupled.
Second half of that file move