templatify Module, CppClass and CppObject so that they move to headers