Created functions-compat.php and corrected old functions in templates