finished PageState refactor (for the mo :)