Split UI code into modular units