Moved object ingest code into a function in utilities.inc.