refactor of state management
developed state management, screen management, input management