Renamed template.php functions