Added functions and custom page template