The existing approach made it hard to extend existing writers. With this change, replacing individual methods of a writer is possible by embedding it. Sharing the WriteNodes function also removes some unnecesseray duplication, so win win.