Refactored writers to use buffers rather than GC alloc slices in thight loops