another approach, separating everything

This is the second approach which allows you to avoid namespaces. However, this isn't without pitfalls - if some of the module classes or functions return a type that is imported from another type, you may also have to add that type to the list of exported objects of that module using declaration merging.