Improved state management.