Refactor stateful interpretors