Adding template class, cleaning out module, implementing a template factory for modules.