Adding functionality to the Tree Widget