Refactoring uiadapter