Added a stub of a proper state machine. Test not working.