Remove dublicated functions in template.php