clean up tree.go and watcher.go