Added a ring buffer class