Quite a few changes, tree view seems to work