Implemented two-way binding for tree selection, misc selection fixes