First stab at implementing a ring buffer. Now tuning should be done. The statistics report causes jitters and can be deactivated by lowering the output verbosity.