Added circular buffer class