Got the unified state space to work. Also fixed pciture.