Added re-ordering to the hierarchy viewer
Bug fixes, minor changes