1. Use memmove to copy byte array. 2. Add pubkey in return structure. 3. Refine code.