Re-add the hierarchy stuff that I merged badly