Added ringbuffer.
Merge branch 'master' into leif2