Rpccleanup

factor out xmlrpc related functions in prepartion for cleanup