Add some experimentation with condition variables.
Cleanup