fix(ingest): Refactoring archive and ingest for code reuse.