Fix connection slot name.
Replace all uses of double or int to represent a SyncMode with the explicit type (so we get type checking). Add validation to every access of a double-encoded SyncMode.