Moved state machine to Eater class