Generate module trees rather than a flat namespace