Cleaned up sequence machine implementation
Implemented TMTestMachine