- add PageResource class
- refactor and other fixes