cpp: Split message out of common, and made codec run with RemoteMessages