Fix graph cropping and arrow curvature

Additionally, the python script is generally more robust.
Remove outdated bug comment
Update lexer and refactor parser

Also updated main package to catch errors properly.
Add new example (and directly generated json)