implemented ViewServer.reset, add_fun, and map_doc