Added a circular buffer implementation to support more interesting uses