Capture client improvements

These patches fix some warnings (with -Wall -Wextra) and remove redundant pthread code.