Some more cleaning up of state