Merge branch 'master', remote-tracking branch 'origin'
New protocol definition. Threads code reorganisation.