Tidy and pretty up code, -10 lns. 

Slightly opinionated tidy-up edits, node-style event concatenating, encapsulates emitting the new _line_ event and add some useful comments.