Updated Template.php