Some refactoring, visual tweaks.