code refactoring and better UI (at least something that isn't so fugly)