Better state management