Refactor client codes, using TypedActor