Use ArrayBuffer for building up batches of lines