Simplify the UI code