Lots of fixes, RPC changes