Cleanup - remove references, reuse code.

This removes some unused references from the project, does cleanup inside Dispose() and also reuses code for adding output panes.