Switch to pthreads condition variables
Squash some compiler warnings
Compiler warnings and coverage