Building Template class