Flatten the module structure