Refactor rpc/action statements