Added some performance methods to ringbuffer. Also renamed it.
Some minor tidying.