Refactor article ingest script

- Thanks @devn