better handling of hierarchy levels that are empty, and some styling tweaks