Added PatternMachine and ConsecutivePatternMachine
Rename tm_unit_test.py to tm_test.py