move module initialization into a module manager, still has some issues like stopping not working and debug crashing