cf71584 Switched to a more robust state system with better UI structure