Modified BufferStorage solution to use new CircularBuffer object which makes code a lot easier to follow.