Isolating the directory tree widget to a separate class