Update for latest 0.8 changes
Better state management