Ringbuffer now works, and performance is great, anything less than 32bit types will cause undefined behaviour