Improve UI and do minor refactoring