added an additional small assertion
Added transitions parsing from json
improved efficiency of code used to parse json.