starting refactoring of the rpc and added message part to repo