Cleanup and add preference for hiding the tree filter.