Some small corrections. Controller compiles.
Loop + targetchanged (we still need mutex for current position?)
Merge branch 'threads2' into threads