I have refactored the code as recommended.I have also modified the not-yet-reviewed writers part to take advantage of the same approach (preallocated static-sized buffer) rather than allocate slices in loops.
Hoping to hear something from you guys! Best, Mike
