  	try {
  	    /* This list needs to be kept in the same order as the list of
  	     * message types in "remoteprotocol.h". Note that messages at the
-@@ -155,36 +83,38 @@ RemoteServer::run()
+@@ -155,40 +113,42 @@ RemoteServer::run()
  	     * don't correspond to dispatch actions.
  	     */
  	    static const dispatch_func dispatch[] = {

 	throw_read_only();
     const char *p = message.data();
     const char *p_end = p + message.size();
@@ -734,27 +820,156 @@ RemoteServer::msg_setmetadata(const string & message)
     string key(p, keylen);
     p += keylen;
     string val(p, p_end - p);

-		&RemoteServer::msg_setmetadata,
-		&RemoteServer::msg_addspelling,
-		&RemoteServer::msg_removespelling,
-		0, // MSG_GETMSET - used during a conversation.
-		0, // MSG_SHUTDOWN - handled by get_message().
-		&RemoteServer::msg_openmetadatakeylist,
-		&RemoteServer::msg_uniqueterms,
+		&RemoteProtocol::msg_allterms,
+		&RemoteProtocol::msg_collfreq,
+		&RemoteProtocol::msg_document,
