Improved UI (uses TreeViewer now), some refactoring