Bit more styling of the tree view
Fix occasional issue inserting incorrect type