Separate UI layout from logic