Sync to devel branch with lynix' JSON RPC code manually merged in