added first version of model and XML writer for state diagrams