Refactor AOS-RPC #2