Fixed QuicksortBuffer because it was only partially correct,now works fine with any number of blocks in buffer