Improving UI code.