Ringbuffer update

There are still some tests missing, but you can go from here.