Refactored template page