Add circularbuffer functionality.