Use unique_ptr to remove an explicit delete. Change return type to pass the unique_ptr to caller.
Just use the Module unique_ptr object directly in many places instead of separate pointer that's kept in sync with it.
Use range-based for loops. NFC