Refactoring. UI updates.