Removed ringbuffer flush and revised it's synchronization (#16)