Simplify UI code.