Improved UI + code refactoring