Cleaning up the API and class structure, in relation to HierarchyTree and their Models

Made the API a bit more constistent, and added in some top level
interfaces, and improved test coverage.