Dont crash

* Implement some missing cases
* Be more robust about syntax it can't recognize
* Use line buffering to play nicely with piping, e.g. CI and build systems