Reduce the size of the buffer, to_read*2 seems like a good fit

Also remove unnecessary MIN() checks