Some reshuffling of keys + adding a test for the PublicKey KeyType