refactoring around user_interface.