Added States

-Added state management system