Revert "Significant UI code restructuring"

This reverts commit 12a087462a8d19b781aeb59066cf0111b496e03e.