add locks and threading
color and timing tweaks
Merge branch 'threaded_flowcam'