diff --git a/src/provenance.py b/src/provenance.py
index <HASH>..<HASH> 100644
--- a/src/provenance.py
+++ b/src/provenance.py
@@ -2,12 +2,42 @@ import inspect
 import hashlib
 import shelve # TODO: Use a better implementation for DB
 import __builtin__
+import pkg_resources
+import sys
 
 def register(function):
     source = inspect.getsource(function)
     print hashlib.sha1(source).hexdigest()
     module = inspect.getmodule(function)
     setattr(module, function.__name__, memoize(function))
+    
+def deep_hash(function):
+    pass 
+    # TODO: code here a recursive analysis of the function bytecode
+    # two options:
+    # - AST
+    # - use of co_names (method calls) and co_varnames
+         
+
+def get_version(module):
+    # Check built-in module
+    if module.__name__ == '__builtins__':
+        return sys.version 
+
+    # Check explicitly declared module version
+    try:
+        return getattr(module, 'version', '__version__', 'VERSION', '__VERSION__')
+    except AttributeError:
+        pass
+    
+    # Check package declared module version
+    try: 
+        return pkg_resources.get_distribution(module.__name__).version 
+    except: 
+        pass
+    
+    # If no other option work, return the hash of the source-code of the module
+    return hashlib.sha1(inspect.getsource(module)).hexdigest() # TODO: Use bytecode instead
 
 def memoize(function):
     def wrapper(*args):
Some initial explorations regarding extracting byte code and recurring over function calls.