converted module manager to c++ class