Inline OutputStream definition
Change intf ChangeListener to new TemplateListener

The use of ChangeListener carries with it a certain semantic (i.e. that
a Swing change takes place there) that should not be present in this
specific scenario. To resolve it I created a new TemplateListener
interface that does not carry any such meaning with it.