Improve NERDTree toggle function