Implemented Template class in models/core.php