Correct logic implemented for treeview
Needs cleaning up
Added UnitTest project