Moved state machine observer out