Added tests and documentation for ToHierarchy
Improved tests for ToHierarchy
Added tests and documentation for Unit and Empty
Added missing documentation