Merge pull request #68 from alex/cleanup

Slightly clean up the OpenSSL binding
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py
index bc2b4ae..27afee5 100644
--- a/cryptography/bindings/openssl/api.py
+++ b/cryptography/bindings/openssl/api.py
@@ -13,10 +13,11 @@
 
 from __future__ import absolute_import, division, print_function
 
-from cryptography.primitives import interfaces
+import sys
 
 import cffi
-import sys
+
+from cryptography.primitives import interfaces
 
 
 class API(object):
@@ -30,36 +31,21 @@
 
     def __init__(self):
         self._ffi = cffi.FFI()
-        self.includes, self.types, self.functions = [], [], []
-        self._import()
-        self._define()
-        self._verify()
+        includes = []
+        for name in self._modules:
+            __import__("cryptography.bindings.openssl." + name)
+            module = sys.modules["cryptography.bindings.openssl." + name]
+            self._ffi.cdef(module.TYPES)
+            self._ffi.cdef(module.FUNCTIONS)
+            includes.append(module.INCLUDES)
+
+        self._lib = self._ffi.verify(
+            source="\n".join(includes),
+            libraries=["crypto"]
+        )
 
         self._lib.OpenSSL_add_all_algorithms()
 
-    def _import(self):
-        """
-        Import all library definitions
-        """
-        for name in self._modules:
-            __import__('cryptography.bindings.openssl.' + name)
-            module = sys.modules['cryptography.bindings.openssl.' + name]
-            self.includes.append(module.INCLUDES)
-            self.types.append(module.TYPES)
-            self.functions.append(module.FUNCTIONS)
-
-    def _define(self):
-        for typedef in self.types:
-            self._ffi.cdef(typedef)
-        for function in self.functions:
-            self._ffi.cdef(function)
-
-    def _verify(self):
-        self._lib = self._ffi.verify(
-            source="\n".join(self.includes),
-            libraries=['crypto']
-        )
-
     def openssl_version_text(self):
         """
         Friendly string name of linked OpenSSL.