internal state machine metamodel added

the event metamodel has been also refactored into the /models folder and
it's used in th SM metamodel