Some changes to transition model, more work on parsing code