improved coding style on tpl_classes()