moved some JSON structures to kcwraps. refactored the structure of the rpc messages.