Replaced CARingBuffer with RingBuffer
RingBuffer is a clone of CARingBuffer but rewritten more in my style and with all warnings fixed