Refactored to improve support of child entities in subdirectory of parent