Category Flattening

flattening Commons categories up to an arbitrary depth.