refactored the page template a bit