Fixed treatment of composite states.
Added exit actions.
Added file with some of the restrictions to statemachines.