Coalesce adjacent write ops

If possible coalesce write ops for adjacent offsets
Bugfix buffer shuffling