Better random generator
properly dispose of the events
Early lock release for write batches.
Removing debug code
Fixing build
Making sure that we are only releasing the journaling task when we are actually completing the IO