simplified hierarchy processing

whether this is actually more readable, I'm not really sure