Add functionality to circular buffer.
Add some event handling.