Refactor page template
Add support for single pages