Refactored the output executor functionality so that it's easy to inheri...

...t from and modify.