smush hierarchy implementation + tests