Finished history extraction, added CSV writer for output.