getPublicKey updates

__toString() eliminates the need for the second getPublicKey() call and the public key format has been changed