Moved next and previous to the StateManager