clean up public key generation