refactored some parts of the user interface