Functionality of buttons complete in tree