Case error in the license block...
Performance improvment : avoid an useless matrix copy while encoding
Corrections on the state machine. Still needs some work, but far less bug-prone