1. fix singleton
2. add comments
3. fix rpc::dispatcher