Refactor some of the changelog code