Add the refresh button and sort the tree