refactor ui framework