Clean up reader code generation and starting writer.