Added hooks at key points of processing within the plugins. Added the preprocess_ouput plugin.