refactoring the UI a bit.