Add Semigroup and Monoid instances for MachineT