added base model template class
added the model template model that managaes the template and its associated objects. also wrote tests for it