Adapted code-tool to subclass PipeTool. Much cleaner.