More work on error correction. The outline of the PreprocessingStage for error correction is there, except that no error correction actually happens yet.