Joint consensus mostly works

Merging joint consensus with master