flatten service directory structure