Added new state management system