Merged with Tai's code for DEP & XEM RPC APIs

Merged with Tai's code for DEP & XEM RPC APIs