Added getCertificate and getPrivateKey methods. Refactoring