One additional refactoring I just noticed in the PayrollWriter is that I don't need to check for the length of the array before processing. I just iterate over it, and everything just works