Changed IModule to take a shared_ptr