Cleaning up genPGPKeys and uploadKey functions