Updated Template.php with minor syntax changes