Implemented SubMachine as a composite of IHState and IMachine.
No idea if it's right, though. The book code is so confusing...