Restructuring hier_merge to be clearer and cleaner. Mid-development.