Refactoring, UI changes, bug fixing