Since the method relies on multiple pieces of output, a single method got messy quickly.

I've taken the approach of abstracting the 'accumulation' logic into its own class.