Extract some state machine functions
Refactor: extract method
Remote pointless instance variable
Add stopping state
Add stopped state
Refactor: simplify
Todos
Add a second message and debug the EM code