Update to create abstract representation of state-machine from textual version
Add some simple nesting