Multiple output plugins

Rebased against master. This resolves the multiple output plugins issue, although some more work is necessary here.