Simplifying code in article repository