State Transitional Machine for Elcodi.

This is an implementation of a State Transitional Machine and the intergration
with given Elcodi implementation.