clean up some minor problems
replace xpPrim with xpJid in ServiceDiscovery