Converted `article_numbers` to a generator to fix issues with memory usage. Cleaned up other bits...
Close StringIO object in inline_compression() after it is used.