Add ringbuffer implimentation + tests