Code cleanup
Pem is now accepted only as string