Working version
Some more defs
Will generate trace info from yaml file in sim