Make Page and Rect public to allow reusing the existing code