contract UI refactoring