diff --git a/README.md b/README.md
index eb491d9..3d0362e 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ such as `repeat` and `minrepeat`.
 To read JSketch, again, you should generate our parser first:
 
 ```sh
-cd parser
+cd jskparser
 make
 ```
 
diff --git a/java_sk/__init__.py b/java_sk/__init__.py
index 5f8525d..2a3f885 100644
--- a/java_sk/__init__.py
+++ b/java_sk/__init__.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import sys
 import os
 
diff --git a/java_sk/decode/__init__.py b/java_sk/decode/__init__.py
index 6bbe75e..6d823b5 100644
--- a/java_sk/decode/__init__.py
+++ b/java_sk/decode/__init__.py
@@ -1,3 +1,6 @@
+from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 import os
 import logging
 
@@ -7,11 +10,11 @@
 from .. import util
 from ..meta.program import Program
 
-from finder import HFinder, EGFinder
-from replacer import HReplacer, EGReplacer, MGReplacer
+from .finder import HFinder, EGFinder
+from .replacer import HReplacer, EGReplacer, MGReplacer
 
-from collection import Collection
-from semantic_checker import SemanticChecker
+from .collection import Collection
+from .semantic_checker import SemanticChecker
 
 
 # white-list checking
@@ -79,7 +82,8 @@ def to_java(java_dir, pgr, output_path):
   # replace collections of interface types with actual classes, if any
   _visitors.append(Collection())
   _visitors.append(SemanticChecker())
-  map(lambda vis: pgr.accept(vis), _visitors)
+  for vis in _visitors:
+    pgr.accept(vis)
 
   ## trimming of the program
   trim(pgr)
diff --git a/java_sk/decode/collection.py b/java_sk/decode/collection.py
index 7c17f64..9b91d90 100644
--- a/java_sk/decode/collection.py
+++ b/java_sk/decode/collection.py
@@ -1,3 +1,6 @@
+from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 from lib.typecheck import *
 import lib.visit as v
 import lib.const as C
@@ -31,7 +34,7 @@ class Collection(object):
   def repl_itf(tname, init=True):
     if not util.is_collection(tname): return tname
     _ids = util.of_collection(tname)
-    ids = map(util.autoboxing, _ids)
+    ids = [util.autoboxing(i) for i in _ids]
     collection = ids[0]
     if init: collection = Collection.__impl[collection]
     generics = ids[1:] # don't be recursive, like map(repl_itf, ids[1:])
diff --git a/java_sk/decode/finder.py b/java_sk/decode/finder.py
index aa41c3d..f976310 100644
--- a/java_sk/decode/finder.py
+++ b/java_sk/decode/finder.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import logging
 
 import lib.visit as v
diff --git a/java_sk/decode/replacer.py b/java_sk/decode/replacer.py
index a00de62..93dcae3 100644
--- a/java_sk/decode/replacer.py
+++ b/java_sk/decode/replacer.py
@@ -1,4 +1,6 @@
-import operator as op
+from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 import re
 import logging
 
@@ -29,7 +31,7 @@ def __init__(self, output_path, holes):
 
     ## hole assignments for roles
     ## glblInit_fid__cid_????,StmtAssign,accessor_???? = n
-    names = map(op.attrgetter("name"), self._holes)
+    names = [hole.name for hole in self._holes]
     regex_role = r"({})__(\S+)_\S+ = (\d+)$".format('|'.join(names))
 
     # interpret the synthesis result
@@ -208,12 +210,11 @@ def visit(self, node):
       rty = node.typ if node.typ != C.J.v else C.J.OBJ
       node.body = to_statements(node, u"{} _out;".format(rty))
 
-      op_strip = op.methodcaller("strip")
       _assigns = self._assigns[mname]
       for _assign in _assigns:
-        lhs, rhs = map(op_strip, _assign.split('='))
+        lhs, rhs = [a.strip() for a in _assign.split('=')]
         if len(lhs.split(' ')) > 1: # i.e., var decl
-          ty, v = map(op_strip, lhs.split(' '))
+          ty, v = [l.strip() for l in lhs.split(' ')]
           ty = ty.split('@')[0] # TODO: cleaner way to retrieve/sanitize type
           node.body += to_statements(node, u"{} {} = {};".format(ty, v, rhs))
         else: # stmt assign
diff --git a/java_sk/decode/semantic_checker.py b/java_sk/decode/semantic_checker.py
index d134160..074b8ba 100644
--- a/java_sk/decode/semantic_checker.py
+++ b/java_sk/decode/semantic_checker.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import logging
 
 import lib.const as C
diff --git a/java_sk/encoder.py b/java_sk/encoder.py
index 5b74826..08d5d3f 100644
--- a/java_sk/encoder.py
+++ b/java_sk/encoder.py
@@ -1,12 +1,18 @@
 from __future__ import print_function
 
-import cStringIO
+from __future__ import absolute_import
+try:
+    import cStringIO
+except: # so sue me.
+    import io as cStringIO
+try: xrange
+except: xrange = range
 import math
 import os
 import copy as cp
 import logging
 
-import util
+from . import util
 
 from functools import partial
 
@@ -77,9 +83,9 @@ def __init__(self, program, out_dir, fs):
         self.main_cls()
 
         clss = utils.extract_nodes([ClassOrInterfaceDeclaration], self.prg)
-        # is_ax_cls = any(map(lambda c: c._axiom, clss))
-        is_ax_cls = True if len(filter(lambda c: c.box, clss)) > 0 else False
-        ax_clss = filter(lambda c: c.axiom, clss)        
+        # is_ax_cls = [c._axiom for c in clss]
+        is_ax_cls = True if len([c for c in clss if c.box]) > 0 else False
+        ax_clss = [c for c in clss if c.axiom]
         
         self.is_ax_cls = is_ax_cls
         self.ax_clss = ax_clss
@@ -98,17 +104,17 @@ def find_main(self):
         mtds = []
         for c in self.clss:
             m = utils.extract_nodes([MethodDeclaration], c)
-            mtds.extend(filter(lambda m: m.name == u'main', m))
+            mtds.extend([md for md in m if md.name == u'main'])
             # do we care if main is static?
             # mtds.extend(filter(lambda m: td.isStatic(m) and m.name == u'main', m))
         lenn = len(mtds)
         if lenn > 1:
-            raise Exception("multiple main()s", map(lambda m: str(utils.get_coid(m)), mtds))
+            raise Exception("multiple main()s", [str(utils.get_coid(m)) for m in mtds])
         return mtds[0] if lenn == 1 else None
 
     def find_harness(self):
         # TODO: these can also be specified with annotations -- we don't support those yet
-        mtds = filter(td.isHarness, self.mtds)
+        mtds = [m for m in self.mtds if td.isHarness(m)]
         return mtds[0] if mtds else None
 
     def main_cls(self):
@@ -130,7 +136,7 @@ def to_sk(self):
         else: os.makedirs(self.sk_dir)
 
         clss = utils.extract_nodes([ClassOrInterfaceDeclaration], self.prg)
-        is_ax_cls = any(map(lambda c: c._axiom, clss))        
+        is_ax_cls = any([c._axiom for c in clss])
         
         # consist builds up some class hierarchies which happens in main.py
         # prg.consist()
@@ -179,9 +185,9 @@ def print_obj_struct(self, is_ax_cls):
 
         if self.tltr.obj_struct:            
             # pretty print
-            i_flds = filter(lambda m: type(m) == FieldDeclaration, self.tltr.obj_struct.members) 
-            flds = map(self.tltr.trans_fld, i_flds)
-            lens = map(lambda f: len(f[0]), flds)
+            i_flds = [m for m in self.tltr.obj_struct.members if type(m) == FieldDeclaration]
+            flds = [self.tltr.trans_fld(m) for m in i_flds]
+            lens = [len(f[0]) for f in flds]
             m = max(lens) + 1
             buf.write("struct " + str(self.tltr.obj_struct) + " {\n")
             if is_ax_cls:
@@ -200,7 +206,7 @@ def print_obj_struct(self, is_ax_cls):
                     if isinstance(i_f.typee, ReferenceType):
                         if isinstance(i_f.typee.typee, ClassOrInterfaceType):
                             clss = utils.extract_nodes([ClassOrInterfaceDeclaration], self.prg)
-                            clss = map(lambda a: a.name, filter(lambda c: c._axiom, clss))  
+                            clss = [a.name for a in [c for c in clss if c._axiom]]
                             
                             if i_f.typee.typee.name in clss:
                                 typ = u'Object'
@@ -261,7 +267,7 @@ def gen_meta_sk(self, is_ax_cls):
 
         buf.write("// distinct class IDs\n")
         items = sorted(self.CLASS_NUMS.items())
-        lens = map(lambda i: len(i[0]), items)
+        lens = [len(i[0]) for i in items]
         m = max(lens)
         for k,v in items:
             if k not in utils.narrow:
@@ -284,7 +290,8 @@ def gen_object_sk(self, is_ax_cls):
         buf.write("package Object;\n\n")
 
         self.bases = util.rm_subs(self.clss)
-        filter(None, map(partial(self.to_struct, is_ax_cls), self.bases))
+        for b in self.bases:
+            self.to_struct(is_ax_cls, b)
         buf.write('Object Object_Object(Object self){\n return self;\n}\n\n')
         with open(os.path.join(self.sk_dir, "Object.sk"), 'w') as f:
             f.write(util.get_and_close(buf))
@@ -297,7 +304,7 @@ def gen_cls_sk(self, cls, is_ax_cls):
         mtds = utils.extract_nodes([MethodDeclaration], cls, recurse=False)
         cons = utils.extract_nodes([ConstructorDeclaration], cls, recurse=False)
         flds = utils.extract_nodes([FieldDeclaration], cls, recurse=False)
-        s_flds = filter(td.isStatic, flds)
+        s_flds = [f for f in flds if td.isStatic(f)]
 
         # filter out non-static fields with initial values
         ns_flds = filter(lambda f: not td.isStatic(f) and f.variable.init, flds)
@@ -345,7 +352,7 @@ def gen_cls_sk(self, cls, is_ax_cls):
         if etypes: buf.write('Object self{};\n\n'.format(len(etypes)-1))
         # not a base class, not the harness class, and doesn't override the base constructor
         # if cls not in self.bases and str(cls) != str(self.mcls) and \
-        if not filter(lambda c: len(c.parameters) == 0, cons):
+        if not [c for c in cons if len(c.parameters) == 0]:
             # these represent this$N (inner classes)
             if etypes:
                 i = len(etypes)-1
@@ -410,7 +417,7 @@ def gen_adt_constructor(mtd):
                     typ = self.tltr.trans_ty(t)
                     if isinstance(t, ReferenceType) and t.arrayCount > 0:
                         typ = "Array_"+typ
-                    if isinstance(t, ReferenceType) and isinstance(t.typee, ClassOrInterfaceType) and str(t.typee) in map(lambda c: c.name, self.ax_clss) and not self.is_ax_cls:
+                    if isinstance(t, ReferenceType) and isinstance(t.typee, ClassOrInterfaceType) and str(t.typee) in [axc.name for axc in self.ax_clss] and not self.is_ax_cls:
                         typ = u'Object'
                         
                 # if p.typee.name in p.symtab:
@@ -439,14 +446,14 @@ def gen_obj_constructor(mtd):
             ptyps = []
             ptyps_name = []
             for t in mtd_param_typs:
-                if isinstance(t, ReferenceType) and isinstance(t.typee, ClassOrInterfaceType) and str(t.typee) in map(lambda c: c.name, self.ax_clss) and not self.is_ax_cls:
+                if isinstance(t, ReferenceType) and isinstance(t.typee, ClassOrInterfaceType) and str(t.typee) in [axc.name for axc in self.ax_clss] and not self.is_ax_cls:
                     typ = u'Object'
                 else:
                     typ = self.tltr.trans_ty(t)
                 ptyps.append(typ)
                 if typ == u'Object' or str(t) == u'byte': typ = str(t)
                 ptyps_name.append(typ)
-            pnms = map(str, mtd.param_names())
+            pnms = [str(p) for p in mtd.param_names()]
             # (ptyps, pnms) = (map(lambda t: self.tltr.trans_ty(t), mtd.param_typs()), map(str, mtd.param_names()))
             # ptyps_name = cp.deepcopy(ptyps)
             if is_ax_cls:
@@ -463,9 +470,9 @@ def gen_obj_constructor(mtd):
                     if isinstance(mtd_param_typs[i], ReferenceType):
                         if mtd_param_typs[i].arrayCount > 0:
                             ptyps[i] = "Array_"+ptyps[i]
-            params = ', '.join(map(lambda p: ' '.join(p), zip(ptyps, pnms)))
+            params = ', '.join([' '.join(p) for p in zip(ptyps, pnms)])
             c = 'Object '
-            if (not is_ax_cls and mtd_name2.split('_')[0] in map(lambda x: x.name, ax_mtds)) and not mtd.boxedRet:
+            if (not is_ax_cls and mtd_name2.split('_')[0] in [x.name for x in ax_mtds]) and not mtd.boxedRet:
                 # c = str(mtd.typee) + u' '
                 c = self.tltr.trans_ty(mtd.typee) + u' '
             if isinstance(mtd.typee, ReferenceType) and mtd.typee.arrayCount > 0 and (not is_ax_cls and not mtd.boxedRet and not mtd.is_bang):
@@ -492,7 +499,7 @@ def gen_obj_constructor(mtd):
                 c += '{}) {{\n    '.format(params)
             else:
                 c += ') {\n    '
-            if mtd_name2.split('_')[0] not in map(lambda x: x.name, ax_mtds):
+            if mtd_name2.split('_')[0] not in [x.name for x in ax_mtds]:
                 # THERE MUST BE A BETTER WAY TO DETECT BANG TYPE METHODS
                 if mtd_name2.split('_')[0].endswith('b'):
                     c += 'self._{0}=new {1}('.format(cls.name.lower(), mtd_name2.capitalize())
@@ -539,15 +546,15 @@ def gen_obj_constructor(mtd):
         # Creates list of adt "functions" (i.e. constructors from top of java file)
         #   including bang functions
         mtds = utils.extract_nodes([MethodDeclaration], cls, recurse=False)
-        adt_mtds = filter(lambda m: m.adt, mtds)
-        non_adt_mtds = filter(lambda m: not m.adt, mtds)
+        adt_mtds = [m for m in mtds if m.adt]
+        non_adt_mtds = [m for m in mtds if not m.adt]
 
         # Write all non axiom / adt functions to file (like static functions)
         for m in non_adt_mtds:
             buf.write(self.to_func(m) + os.linesep)        
         
         # add bang functions for non-pure methods
-        for (m,i) in zip(adt_mtds, xrange(len(adt_mtds))):
+        for (m,i) in list(zip(adt_mtds, xrange(len(adt_mtds)))):
             if not m.pure:
                 if not m.constructor:
                     mtd = cp.copy(m)
@@ -577,19 +584,19 @@ def gen_obj_constructor(mtd):
             adt_mtds = [m] + adt_mtds                                
 
         # I like to format
-        max_len = max(map(lambda m: len(m.name), adt_mtds))
+        max_len = max([len(m.name) for m in adt_mtds])
         
         # Create ADT constructors for all methods and wraps them in ADT struct
         #  Also create a dictionary for object constructors for symbol table reference
-        cons = map(gen_obj_constructor, adt_mtds)
-        adt_cons = map(gen_adt_constructor, adt_mtds)
+        cons = [gen_obj_constructor(m) for m in adt_mtds]
+        adt_cons = [gen_adt_constructor(m) for m in adt_mtds]
         adt = 'adt {} {{\n{}}}\n\n{}'.format(cname, ''.join(adt_cons), ''.join(cons))
         buf.write(adt)
 
         # updates n's symbol table to include parents symbol table items
         def cpy_sym(n, *args):
-            if n.parentNode: n.symtab = dict(n.parentNode.symtab.items() +
-                                             n.symtab.items())
+            if n.parentNode: n.symtab = dict(list(n.parentNode.symtab.items()) +
+                                             list(n.symtab.items()))
         
         # Iterates through ADT constructors
         #   Creates a dictionary of xforms using constructor names
@@ -608,7 +615,7 @@ def cpy_sym(n, *args):
             _self = Parameter({u'id':{u'name':u'selff'},
                                    u'type':{u'@t': u'ReferenceType', u'type': {u'@t':u'ClassOrInterfaceType', u'name':cname},},},)
             x.childrenNodes.append(_self)
-            x.parameters = [_self] + map(cp.copy, a.parameters)
+            x.parameters = [_self] + [cp.copy(p) for p in a.parameters]
                 
             x.adtName = str(a)
             x.add_parent_post(cls, True)
@@ -618,7 +625,8 @@ def cpy_sym(n, *args):
         # Applies cpy_sym to all children of this class and all children of those
         #    Updates symbol table of each of these children to include parent's
         #    symbol table
-        map(partial(utils.walk, cpy_sym), cls.childrenNodes)
+        for c in cls.childrenNodes:
+           utils.walk(cpy_sym, c)
             
         # # create xform dispatch method
         # #    i.e. calls the right xform depending on type of ADT
@@ -721,14 +729,14 @@ def set_param_names(a, xf, adt_mtds, depth, xf_sym, name, xnames):
                                 else:
                                     xname = ((name+u'_')*(depth))+name+u'.'+xname
                                     
-                                poss_names = filter(lambda n: len(n.split('_')) == depth+1, xnames)
+                                poss_names = [n for n in xnames if len(n.split('_')) == depth+1]
                                 if len(poss_names) > 0:
                                     new_xname = poss_names[0].split('.')[0]
                                     xname = new_xname+u'.'+xname.split('.')[-1]
                         xf_sym.symtab[old_name] = xname
                         xnames.append(xname)
                 else:
-                    xf2 = filter(lambda m: param.method.name == m.name.split('_')[0], adt_mtds)[0]
+                    xf2 = [m for m in adt_mtds if param.method.name == m.name.split('_')[0]][0]
                     if depth == 0:
                         set_param_names(param.method, xf2, adt_mtds, depth+1, xf_sym, xparam.name, xnames)
                     else:
@@ -805,20 +813,22 @@ def set_param_names(a, xf, adt_mtds, depth, xf_sym, name, xnames):
             # add a symbol table items to xf
             #   this will give it access to the argument names of a
             #   then updates xf children with 
-            xf.symtab = dict(a.symtab.items() + xf.symtab.items())
-            map(partial(utils.walk, cpy_sym), xf.childrenNodes)
+            xf.symtab = dict(list(a.symtab.items()) + list(xf.symtab.items()))
+            for c in xf.childrenNodes:
+                utils.walk(cpy_sym, c)
 
             # NOT SURE WHY THIS IS NEEDED
             #    without this it isn't able to resolve the string type of the
             #    function. not sure why...
-            a.symtab = dict(xf.symtab.items() + a.symtab.items())
-            map(partial(utils.walk, cpy_sym), a.childrenNodes)
+            a.symtab = dict(list(xf.symtab.items()) + list(a.symtab.items()))
+            for c in a.childrenNodes:
+                utils.walk(cpy_sym, c)
 
             # returns empty switch statement to be filled by axioms declarations
             #   of the axiom "a"
             body = xf.get_xform()
 
-            if any(map(lambda p: p.method, a.parameters)):                        
+            if any([p.method for p in a.parameters]):
                 # iterate through body of axiom declarations of a, translate
                 #    them to appropriate IRs (i.e. JSON dicts)
                 a.body.stmts = self.tltr.trans_xform(a.name, body, a.body.stmts)
@@ -834,7 +844,7 @@ def set_param_names(a, xf, adt_mtds, depth, xf_sym, name, xnames):
                                 
                 # cases = map(lambda d: d.name_no_nested().capitalize(), decs)
                 
-                decs2 = filter(lambda m: m.name.split('_')[0] == a.parameters[i].name and a.parameters[i].name == cls.name, adt_mtds)
+                decs2 = [m for m in adt_mtds if m.name.split('_')[0] == a.parameters[i].name and a.parameters[i].name == cls.name]
                 
                 # Add the empty constructor to the declarations if needed
                 if not a.parameters[0].method:
@@ -864,7 +874,7 @@ def set_param_names(a, xf, adt_mtds, depth, xf_sym, name, xnames):
                 casess.append(cases)
                 
             # add cases to body
-            if any(map(lambda p: p.method, a.parameters)):                            
+            if any([p.method for p in a.parameters]):
                 body.add_body_nested(casess, a.body.stmts, adt_mtds, xf.parameters, cls, a, self.is_ax_cls)
             else:
                 body.create_normal_body(a.body)
@@ -904,17 +914,20 @@ def per_cls(cls):
             cname = str(cls)
             if cname != str(cls_v):
                 self.tltr.ty[str(cls)] = str(cls_v) if not cls.axiom else str(cls)  
-            flds = filter(lambda m: type(m) == FieldDeclaration, cls.members)
+            flds = [m for m in cls.members if type(m) == FieldDeclaration]
             def cp_fld(fld):
                 fld_v = cp.copy(fld)
                 fld_v.parentNode = cls
                 cls_v.members.append(fld_v)
                 cls_v.childrenNodes.append(fld_v)
-            map(cp_fld, filter(lambda f: not td.isStatic(f), flds))
-        map(per_cls, utils.all_subClasses(cls))
+            for f in flds:
+                if not td.isStatic(f):
+                    cp_fld(f)
+        for c in utils.all_subClasses(cls):
+            per_cls(c)
 
         # add ADT fields
-        axiom_clss = filter(lambda c: c.axiom, utils.all_subClasses(cls))
+        axiom_clss = [c for c in utils.all_subClasses(cls) if c.axiom]
         for a in axiom_clss:
             fd = FieldDeclaration(
                 {u'variables':{u'@e': [{u'@t': u'VariableDeclarator',
diff --git a/java_sk/glob2/compat.py b/java_sk/glob2/compat.py
index 00a4d6f..b8edda0 100644
--- a/java_sk/glob2/compat.py
+++ b/java_sk/glob2/compat.py
@@ -1,6 +1,7 @@
 # Back-port functools.lru_cache to Python 2 (and <= 3.2)
 # {{{ http://code.activestate.com/recipes/578078/ (r6)
 
+from __future__ import absolute_import
 from collections import namedtuple
 from functools import update_wrapper
 from threading import RLock
diff --git a/java_sk/glob2/fnmatch.py b/java_sk/glob2/fnmatch.py
index 47db550..1d1e477 100644
--- a/java_sk/glob2/fnmatch.py
+++ b/java_sk/glob2/fnmatch.py
@@ -9,6 +9,7 @@
 The function translate(PATTERN) returns a regular expression
 corresponding to PATTERN.  (It does not compile it.)
 """
+from __future__ import absolute_import
 import os
 import posixpath
 import re
@@ -111,4 +112,4 @@ def translate(pat):
                 res = '%s([%s])' % (res, stuff)
         else:
             res = res + re.escape(c)
-    return res + '\Z(?ms)'
+    return '(?ms)' + res + '\Z'
diff --git a/java_sk/glob2/impl.py b/java_sk/glob2/impl.py
index 0186451..2374384 100644
--- a/java_sk/glob2/impl.py
+++ b/java_sk/glob2/impl.py
@@ -1,6 +1,8 @@
 """Filename globbing utility."""
 
 from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 
 import sys
 import os
@@ -67,7 +69,7 @@ def iglob(self, pathname, with_matches=False):
         result = self._iglob(pathname)
         if with_matches:
             return result
-        return map(lambda s: s[0], result)
+        return [s[0] for s in result]
 
     def _iglob(self, pathname, rootcall=True):
         """Internal implementation that backs :meth:`iglob`.
@@ -150,7 +152,7 @@ def resolve_pattern(self, dirname, pattern, globstar_with_root):
                 names = [''] if globstar_with_root else []
                 for top, entries in self.walk(dirname):
                     _mkabs = lambda s: os.path.join(top[len(dirname)+1:], s)
-                    names.extend(map(_mkabs, entries))
+                    names.extend([_mkabs(e) for e in entries])
                 # Reset pattern so that fnmatch(), which does not understand
                 # ** specifically, will only return a single group match.
                 pattern = '*'
@@ -163,7 +165,7 @@ def resolve_pattern(self, dirname, pattern, globstar_with_root):
             # Remove hidden files by default, but take care to ensure
             # that the empty string we may have added earlier remains.
             # Do not filter out the '' that we might have added earlier
-            names = filter(lambda x: not x or not _ishidden(x), names)
+            names = [x for x in names if not x or not _ishidden(x)]
         return fnmatch.filter(names, pattern)
 
 
diff --git a/java_sk/logger.py b/java_sk/logger.py
index 862cab1..d8b893d 100644
--- a/java_sk/logger.py
+++ b/java_sk/logger.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import re
 import sys
@@ -6,7 +7,7 @@
 from lib.enum import enum
 from lib.rlock import FLockFileHandler
 
-import util
+from . import util
 
 C.log_caller = enum(JAVASK="jsk", PSKETCH="psketch")
 
diff --git a/java_sk/main.py b/java_sk/main.py
index 70b0d55..8210529 100755
--- a/java_sk/main.py
+++ b/java_sk/main.py
@@ -1,12 +1,13 @@
 #! /usr/bin/env python
+from __future__ import absolute_import
 import os
 import sys
 import logging
 import logging.config
 
-import sketch
-import util
-from encoder import Encoder
+from . import sketch
+from . import util
+from .encoder import Encoder
 
 from jskparser.jskparser import parse
 
diff --git a/java_sk/psketch.py b/java_sk/psketch.py
index ab5e9ae..84aba44 100755
--- a/java_sk/psketch.py
+++ b/java_sk/psketch.py
@@ -1,5 +1,8 @@
 #! /usr/bin/env python
 
+from __future__ import absolute_import
+try: xrange
+except: xrange = range
 import multiprocessing
 import os
 import logging
@@ -44,7 +47,8 @@ def p_run(cmd, argv):
   n_cpu = multiprocessing.cpu_count()
   pool = multiprocessing.Pool(max(1, int(n_cpu * 0.75)))
 
-  def found( (fname, r) ):
+  def found(cegis_result):
+    (fname, r) = cegis_result
     if r: # found, copy that output file
       shutil.copyfile(fname, output_path)
       pool.close()
diff --git a/java_sk/rewrite/__init__.py b/java_sk/rewrite/__init__.py
index b1b68aa..f6c6636 100644
--- a/java_sk/rewrite/__init__.py
+++ b/java_sk/rewrite/__init__.py
@@ -1,13 +1,14 @@
+from __future__ import absolute_import
 import logging
 
 from lib.typecheck import *
 
 from ..meta.program import Program
 
-from desugar import Desugar
-from generator import CGenerator, MGenerator
-from hole import EHole
-from semantic_checker import SemanticChecker
+from .desugar import Desugar
+from .generator import CGenerator, MGenerator
+from .hole import EHole
+from .semantic_checker import SemanticChecker
 
 @takes(Program)
 @returns(nothing)
diff --git a/java_sk/rewrite/desugar.py b/java_sk/rewrite/desugar.py
index 5f03753..661f2e7 100644
--- a/java_sk/rewrite/desugar.py
+++ b/java_sk/rewrite/desugar.py
@@ -1,3 +1,6 @@
+from __future__ import absolute_import
+try: xrange
+except: xrange = range
 import logging
 
 import lib.const as C
@@ -38,7 +41,7 @@ def visit(self, node):
   @v.when(Statement)
   def visit(self, node):
     if node.kind == C.S.MINREPEAT:
-      b = '\n'.join(map(str, node.b))
+      b = '\n'.join([str(b) for b in node.b])
       body = u""
       for i in xrange(9): # TODO: parameterize
         body += u"""
diff --git a/java_sk/rewrite/generator.py b/java_sk/rewrite/generator.py
index f75c111..e1d8562 100644
--- a/java_sk/rewrite/generator.py
+++ b/java_sk/rewrite/generator.py
@@ -1,3 +1,6 @@
+from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 import copy
 import logging
 
diff --git a/java_sk/rewrite/hole.py b/java_sk/rewrite/hole.py
index 7ced5f7..2c939cf 100644
--- a/java_sk/rewrite/hole.py
+++ b/java_sk/rewrite/hole.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import logging
 
 import lib.const as C
diff --git a/java_sk/rewrite/semantic_checker.py b/java_sk/rewrite/semantic_checker.py
index 753ea22..ef4ff0c 100644
--- a/java_sk/rewrite/semantic_checker.py
+++ b/java_sk/rewrite/semantic_checker.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import logging
 
 import lib.const as C
diff --git a/java_sk/sketch.py b/java_sk/sketch.py
index 2d88245..f082236 100755
--- a/java_sk/sketch.py
+++ b/java_sk/sketch.py
@@ -1,5 +1,9 @@
 #! /usr/bin/env python
 
+from __future__ import absolute_import
+from __future__ import print_function
+try: xrange
+except: xrange = range
 import multiprocessing
 import os
 import logging
@@ -48,7 +52,8 @@ def p_run(sk_dir, output_path):
     n_cpu = multiprocessing.cpu_count()
     pool = multiprocessing.Pool(max(1, int(n_cpu * 0.75)))
   
-    def found( (fname, r) ):
+    def found(sketch_result):
+        (fname, r) = sketch_result
         if r: # found, copy that output file
             shutil.copyfile(fname, output_path)
             pool.close()
diff --git a/java_sk/translator.py b/java_sk/translator.py
index 32961ea..859124b 100644
--- a/java_sk/translator.py
+++ b/java_sk/translator.py
@@ -1,8 +1,17 @@
 #!/usr/bin/env python
+from __future__ import absolute_import
 from __future__ import print_function
+try: unicode
+except: unicode = u"".__class__
+try: xrange
+except: xrange = range
 
+from functools import reduce
 import sys
-import cStringIO
+try:
+    import cStringIO
+except: # so sue me.
+    import io as cStringIO
 import logging
 import copy
 import os
@@ -12,7 +21,7 @@
 from . import convert
 from . import builtins
 
-import visit as v
+from . import visit as v
 
 from ast import Operators as op
 from ast import AssignOperators as assignop
@@ -168,7 +177,7 @@ def visit(self, n, **kwargs):
         # self.printSepList(n.parameters)
         for i in range(0, len(n.parameters)):
             param = n.parameters[i]
-            if isinstance(param.typee, ReferenceType) and isinstance(param.typee.typee, ClassOrInterfaceType) and str(param.typee.typee) in map(lambda c: c.name, self._ax_clss) and not self._is_ax_cls:
+            if isinstance(param.typee, ReferenceType) and isinstance(param.typee.typee, ClassOrInterfaceType) and str(param.typee.typee) in [c.name for c in self._ax_clss] and not self._is_ax_cls:
                 self.printt('Object')
             else:
                 param.typee.accept(self, **kwargs)
@@ -201,9 +210,9 @@ def visit(self, n, **kwargs):
                 s.append(u'fs_s@Object(HashMap_NoHash_HashMap_NoHash(new Object(__cid=HashMap_NoHash())));')
             n.body.stmts = s + n.body.stmts
 
-        boxedRet = u'boxedRet' in map(lambda a: str(a), n.annotations) or n.boxedRet
+        boxedRet = u'boxedRet' in [str(a) for a in n.annotations] or n.boxedRet
             
-        if (isinstance(n.typee, ReferenceType) and isinstance(n.typee.typee, ClassOrInterfaceType) and str(n.typee.typee) in map(lambda c: c.name, self._ax_clss) and not self._is_ax_cls) or boxedRet:
+        if (isinstance(n.typee, ReferenceType) and isinstance(n.typee.typee, ClassOrInterfaceType) and str(n.typee.typee) in [c.name for c in self._ax_clss] and not self._is_ax_cls) or boxedRet:
             self.printt('Object')
         else:
             n.typee.accept(self, **kwargs)
@@ -228,13 +237,13 @@ def visit(self, n, **kwargs):
             # print("HERE: "+str(n))
             # for i in range(0, len(params)):
             #     p = params[i]
-            #     if isinstance(p.typee, ReferenceType) and isinstance(p.typee.typee, ClassOrInterfaceType) and str(p.typee.typee) in map(lambda c: c.name, self._ax_clss) and not self._is_ax_cls:
+            #     if isinstance(p.typee, ReferenceType) and isinstance(p.typee.typee, ClassOrInterfaceType) and str(p.typee.typee) in [c.name for c in self._ax_clss] and not self._is_ax_cls:
             #         params[i] = Parameter({u'id':{u'name':p.name},
             #                                u'type':{u'@t': u'ReferenceType', u'type': {u'@t':u'ClassOrInterfaceType', u'name':u'Object'},},},)
             
             for i in range(0, len(params)):
                 param = params[i]
-                if ((isinstance(param.typee, ReferenceType) and isinstance(param.typee.typee, ClassOrInterfaceType) and str(param.typee.typee) in map(lambda c: c.name, self._ax_clss) and not self._is_ax_cls and not str(n).startswith('xform_')) or (i+1) in n.boxedArgs) or (i == 0 and n.boxedRet):
+                if ((isinstance(param.typee, ReferenceType) and isinstance(param.typee.typee, ClassOrInterfaceType) and str(param.typee.typee) in [c.name for c in self._ax_clss] and not self._is_ax_cls and not str(n).startswith('xform_')) or (i+1) in n.boxedArgs) or (i == 0 and n.boxedRet):
                     self.printt('Object')
                 else:
                     param.typee.accept(self, **kwargs)
@@ -305,7 +314,7 @@ def visit(self, n, **kwargs):
                     name = names[0]
                     for nam in names[1:]:
                         name += u'_'+nam
-                    adt_mtd = filter(lambda m: str(m) == name or (str(m) == name.replace('_Object', '', 1)),e.adt_mtds)[0]
+                    adt_mtd = [m for m in e.adt_mtds if str(m) == name or (str(m) == name.replace('_Object', '', 1))][0]
                     ret_val = str(n)[6:].lower().capitalize()+u'('
                     if not len(adt_mtd.parameters) == 0 and adt_mtd.parameters[0].name == u'self':
                         ret_val += u'self=selff._'+str(parent).lower()          
@@ -622,7 +631,7 @@ def visit(self, n, **kwargs):
     @v.when(ExplicitConstructorInvocationStmt)
     def visit(self, n, **kwargs):
         if n.isThis:
-            self.printt('_'.join([str(n.get_coid()), str(n.get_coid())] + map(str, n.arg_typs())))
+            self.printt('_'.join([str(n.get_coid()), str(n.get_coid())] + [str(t) for t in n.arg_typs()]))
         else:
             if n.expr:
                 n.expr.accept(self, **kwargs)
@@ -632,7 +641,7 @@ def visit(self, n, **kwargs):
             if not sups: exit('Calling super with  with no super class: {}'.format(str(cls)))
             def ty(a):
                 return a.typee.name if type(a) != NameExpr else n.symtab[a.name].typee.name
-            self.printt('_'.join([str(sups[0]), str(sups[0])] + map(ty, n.args)))
+            self.printt('_'.join([str(sups[0]), str(sups[0])] + [ty(a) for a in n.args]))
             self.printt('@{}'.format(str(sups[0])))
         self.printt(u'(self')
         if n.args: self.printt(', ')
@@ -705,13 +714,13 @@ def visit(self, n, **kwargs):
         if typ and isinstance(typ, ClassOrInterfaceType) or isinstance(typ, ReferenceType):
             cls = typ.symtab.get(typ.name)
 
-        if (cls and isinstance(cls, ClassOrInterfaceDeclaration) and cls.axiom) or (n.annotations != [] and ((u'isBoxed' in map(lambda a: str(a), n.annotations) or u'box' in map(lambda a: str(a), n.annotations)))):
+        if (cls and isinstance(cls, ClassOrInterfaceDeclaration) and cls.axiom) or (n.annotations != [] and ((u'isBoxed' in [str(a) for a in n.annotations] or u'box' in [str(a) for a in n.annotations]))):
             self.printt('Object')
         else:
             n.typee.accept(self, **kwargs)
         # self.printt(' ')
-        kwargs[u'box'] = u'box' in map(lambda a: str(a), n.annotations)
-        kwargs[u'unbox'] = (u'unbox' in map(lambda a: str(a), n.annotations), n.typee)
+        kwargs[u'box'] = u'box' in [str(a) for a in n.annotations]
+        kwargs[u'unbox'] = (u'unbox' in [str(a) for a in n.annotations], n.typee)
         self.printSepList(n.varss, **kwargs)
         kwargs[u'box'] = False
         kwargs[u'unbox'] = False                       
@@ -1031,10 +1040,10 @@ def visit(self, n, **kwargs):
             self.printt('.')
         if n.args:
             typs = []
-            tparam_nms = map(lambda t: t.name, cls.typeParameters)
+            tparam_nms = [t.name for t in cls.typeParameters]
             cons = utils.extract_nodes([ConstructorDeclaration], cls)
             if cls.axiom:
-                cons += filter(lambda m: m.constructor, utils.extract_nodes([MethodDeclaration], cls))
+                cons += [m for m in utils.extract_nodes([MethodDeclaration], cls) if m.constructor]
             for a in n.args:
                 if type(a) == FieldAccessExpr:
                     tname = utils.find_fld(a, self.obj_struct).typee
@@ -1057,7 +1066,7 @@ def visit(self, n, **kwargs):
                         # break
                 else:
                     if len(typs) == len(c.param_typs()) and \
-                       all(map(lambda (a,b): (str(a) == str(b)), zip(typs, c.param_typs()))):
+                       all([(str(a) == str(b)) for (a, b) in zip(typs, c.param_typs())]):
                         nm = str(c)
                         break            
             self.printt(nm)
@@ -1074,12 +1083,13 @@ def visit(self, n, **kwargs):
             anon_cls.childrenNodes.extend(anon_cls.members)
             anon_cls.symtab = {}
             anon_cls.symtab.update({anon_cls.name:anon_cls})
-            map(lambda m: anon_cls.symtab.update({str(m):m}), n.anonymousClassBody)
+            for m in n.anonymousClassBody:
+                anon_cls.symtab.update({str(m):m})
             target.symtab.update({nm:anon_cls})
 
             tltr = copy.copy(self)
             tltr.indentation = ''
-            anon = map(tltr.trans, anon_cls.members)
+            anon = [tltr.trans(m) for m in anon_cls.members]
 
             anon.append('int {}() {{ return {}; }}\n'.format(anon_cls.name, self.anon_ids))
             self.anon_ids -= 1
@@ -1508,7 +1518,7 @@ def trans_fld(self, fld):
                 if isinstance(typ_cls, ClassOrInterfaceDeclaration) and typ_cls.axiom:
                     ty = u'Object'
                 
-        if isinstance(fld.typee, ReferenceType) and fld.typee.arrayCount > 0:
+        if isinstance(fld.typee, ReferenceType) and int(fld.typee.arrayCount) > 0:
             if self._is_ax_cls:
                 if len(fld.name) > 7 and fld.name[0:7]=='_array_':
                     ty = 'Array_{}'.format(self.trans_ty(fld.typee))                    
@@ -1518,7 +1528,8 @@ def trans_fld(self, fld):
                 ty = 'Array_{}'.format(ty)                            
         return (ty, nm, init)
 
-    def trans_params(self, (ty, nm)):
+    def trans_params(self, ty_nm):
+        (ty, nm) = ty_nm
         return ' '.join([self.trans_ty(ty), nm])
 
     def trans_call(self, callexpr, **kwargs):
@@ -1582,9 +1593,9 @@ def write_call():
                         if not cls:
                             pmdec = utils.get_parent(callexpr, MethodDeclaration)
                             pcls = callexpr.get_coid()
-                            tparams = map(lambda p: p, pcls.typeParameters) + \
-                                      map(lambda p: p, pmdec.typeParameters) if pmdec else []
-                            tparam = filter(lambda p: p.name == scope.typee.name, tparams)
+                            tparams = [p for p in pcls.typeParameters] + \
+                                      [p for p in pmdec.typeParameters] if pmdec else []
+                            tparam = [p for p in tparams if p.name == scope.typee.name]
                             if tparam:
                                 tparam = tparam[0]
                                 cls = scope.symtab.get(tparam.typeBound[0].name)
@@ -1605,7 +1616,7 @@ def uninterpreted():
             # write uninterpreted function signature
             # add fun declaration as uninterpreted
             with open(os.path.join(self.sk_dir, 'meta.sk'), 'a') as f:
-                trans_ftypes = set([tuple(map(self.trans_ty, map(convert, c))) for c in ftypes])
+                trans_ftypes = set([tuple([self.trans_ty(convert(t)) for t in c]) for c in ftypes])
                 for fun in [list(d) for d in trans_ftypes]:
                     if len(fun) > 1:
                         sig = '{}.{}.{}'.format(fun[0], fun[1], callexpr.name)
@@ -1679,18 +1690,18 @@ def uninterpreted():
         # Compile-Time Step 2: Determine Method Signature
         # 15.12.2.1. Identify Potentially Applicable Methods
         pots = self.identify_potentials(callexpr, cls)
-        logging.debug('potentitals: {}'.format(map(lambda m: str(m), pots)))
+        logging.debug('potentitals: {}'.format([str(m) for m in pots]))
         if not pots:
             uninterpreted()
             return
 
         # 15.12.2.2. Phase 1: Identify Matching Arity Methods Applicable by Strict Invocation
         strict_mtds = self.identify_strict(callexpr, pots)
-        logging.debug('strict_applicable: {}'.format(map(lambda m: str(m), strict_mtds)))
+        logging.debug('strict_applicable: {}'.format([str(m) for m in strict_mtds]))
 
         # 15.12.2.3. Phase 2: Identify Matching Arity Methods Applicable by Loose Invocation
         loose_mtds = self.identify_loose(callexpr, pots)
-        logging.debug('loose_applicable: {}'.format(map(lambda m: str(m), loose_mtds)))
+        logging.debug('loose_applicable: {}'.format([str(m) for m in loose_mtds]))
 
         # 15.12.2.4. Phase 3: Identify Methods Applicable by Variable Arity Invocation
         # TODO: this
@@ -1747,8 +1758,8 @@ def uninterpreted():
                 return            
             clss = [cls] + utils.all_subClasses(cls) if invocation_mode != 'uninterpreted' else \
                    utils.all_subClasses(cls)
-            clss = filter(lambda c: not c.interface, clss)
-            logging.debug('subclasses: {}'.format(map(lambda c: str(c), clss)))
+            clss = [c for c in clss if not c.interface]
+            logging.debug('subclasses: {}'.format([str(c) for c in clss]))
 
             scp = tltr.trans(callexpr.scope)
             args = [NameExpr({u'name':scp})] + callexpr.args
@@ -1803,20 +1814,20 @@ def identify_potentials(self, callexpr, cls):
         call_arg_typs = callexpr.arg_typs()
         for key,val in cls.symtab.items():
             if type(val) != MethodDeclaration: continue
-            tparam_names = map(lambda t: t.name, val.typeParameters)
-            tparam_names.extend(map(lambda t: t.name, val.get_coid().typeParameters))
+            tparam_names = [t.name for t in val.typeParameters]
+            tparam_names.extend([t.name for t in val.get_coid().typeParameters])
             if self._is_ax_cls or callexpr.name.startswith('xform'):
                 name = callexpr.name
                 if val.adtType and callexpr.name != val.name and len(call_arg_typs) > 1:
                     name += '_'+'_'.join(map(str, call_arg_typs[1:]))
                 if name == val.name and len(callexpr.args) == len(val.parameters):
-                    if all(map(lambda t: t[1].name in tparam_names or utils.is_subtype(t[0], t[1]),
-                               zip(call_arg_typs, val.param_typs()))):
+                    if all([t[1].name in tparam_names or utils.is_subtype(t[0], t[1]) for t in
+                               zip(call_arg_typs, val.param_typs())]):
                         mtds.append(val)
             else:
                 if callexpr.name == val.name and len(callexpr.args) == len(val.parameters):
-                    if all(map(lambda t: t[1].name in tparam_names or utils.is_subtype(t[0], t[1]),
-                               zip(call_arg_typs, val.param_typs()))):
+                    if all([t[1].name in tparam_names or utils.is_subtype(t[0], t[1]) for t in
+                               zip(call_arg_typs, val.param_typs())]):
                         mtds.append(val)                
         return mtds
 
@@ -1831,7 +1842,7 @@ def identify_strict(self, callexpr, mtds, **kwargs):
 
     def match_strict(self, arg_typs, param_typs, **kwargs):
         for atyp,ptyp in zip(arg_typs, param_typs):
-            if ptyp.name in map(lambda p: p.name, param_typs): continue
+            if ptyp.name in [p.name for p in param_typs]: continue
             if not (self.identity_conversion(atyp,ptyp) or \
                     self.primitive_widening(atyp,ptyp) or \
                     self.reference_widening(atyp,ptyp)):
@@ -1850,8 +1861,8 @@ def identify_loose(self, callexpr, mtds, **kwargs):
     def match_loose(self, arg_typs, param_typs, typeParameters):
         # TODO: Spec says if the result is a raw type, do an unchecked conversion. Does this already happen?
         for atyp,ptyp in zip(arg_typs, param_typs):
-            if ptyp.name in map(lambda p: p.name, param_typs): continue
-            if ptyp.name in map(lambda p: p.name, typeParameters) and not isinstance(atyp, PrimitiveType): continue
+            if ptyp.name in [p.name for p in param_typs]: continue
+            if ptyp.name in [p.name for p in typeParameters] and not isinstance(atyp, PrimitiveType): continue
             # going to ignore, identity and widenings b/c they should be caught with strict
             if not (self.boxing_conversion(atyp, ptyp) or \
                     (self.unboxing_conversion(atyp, ptyp) and \
@@ -1863,8 +1874,8 @@ def most(candidate, others):
             ctypes = candidate.param_typs()
             for i in range(len(others)):
                 # if the parameters of the candidate aren't less specific than all the parameters of other
-                if not all(map(lambda t: utils.is_subtype(t[0], t[1]), \
-                               zip(ctypes, others[i].param_typs()))):
+                if not all([utils.is_subtype(t[0], t[1]) for t in
+                            zip(ctypes, others[i].param_typs())]):
                     return False
             return True
         for mi in xrange(len(mtds)):
@@ -2131,7 +2142,8 @@ def change_call(s, *args):
                         
         # apply change_call to every statement, and every statement's children
         #    note that stmt is changed first, followed by it's children
-        map(lambda s: utils.walk(change_call, s), stmts)
+        for s in stmts:
+            utils.walk(change_call, s)
 
         # alter stmts to wrap and unwrap primitives appropriately
         new_stmts = []
diff --git a/java_sk/util.py b/java_sk/util.py
index 82f6728..941319d 100644
--- a/java_sk/util.py
+++ b/java_sk/util.py
@@ -1,11 +1,16 @@
+from __future__ import absolute_import
 import os
 
-from itertools import ifilter, ifilterfalse
+try:
+    from itertools import ifilter, ifilterfalse
+except:
+    ifilter = filter
+    from itertools import filterfalse as ifilterfalse
 
 from ast.utils import utils
 from ast.body.classorinterfacedeclaration import ClassOrInterfaceDeclaration
 
-import glob2
+from . import glob2
 
 """
 regarding paths and files
@@ -36,17 +41,18 @@ def clean_dir(path):
   
 def add_object(ast):
     clss = utils.extract_nodes([ClassOrInterfaceDeclaration], ast)
-    clss = filter(lambda c: c.name != u'Object', clss)
+    clss = [c for c in clss if c.name != u'Object']
     obj = ast.symtab.get(u'Object')
     def obj_subs(n):
       if not n.extendsList:
           n.extendsList = [obj]
           obj.subClasses.append(n)
-    map(obj_subs, clss)
+    for c in clss:
+        obj_subs(c)
     ast.types.append(obj)
   
 def rm_subs(clss):
-    return filter(lambda c: not c.extendsList and not c.implementsList, clss)
+    return [c for c in clss if not c.extendsList and not c.implementsList]
 
 def sanitize_mname(mname):
     return mname.replace("[]",'s')
diff --git a/java_sk/visit.py b/java_sk/visit.py
index d2ca96f..890df4f 100644
--- a/java_sk/visit.py
+++ b/java_sk/visit.py
@@ -4,6 +4,7 @@
 # visit.py
 # Updated 2013-06-20 to fix bug on line 41
 
+from __future__ import absolute_import
 import inspect
 
 __all__ = ['on', 'when']
@@ -18,7 +19,7 @@ def f(fn):
 def when(param_type):
   def f(fn):
     frame = inspect.currentframe().f_back
-    dispatcher = frame.f_locals[fn.func_name]
+    dispatcher = frame.f_locals[fn.__name__]
     if not isinstance(dispatcher, Dispatcher):
       dispatcher = dispatcher.dispatcher
     dispatcher.add_target(param_type, fn)
diff --git a/jskparser/ast/body/annotationdeclaration.py b/jskparser/ast/body/annotationdeclaration.py
index 0521a9e..c3bb1fa 100644
--- a/jskparser/ast/body/annotationdeclaration.py
+++ b/jskparser/ast/body/annotationdeclaration.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .typedeclaration import TypeDeclaration
diff --git a/jskparser/ast/body/annotationmemberdeclaration.py b/jskparser/ast/body/annotationmemberdeclaration.py
index abb8f42..04980b7 100644
--- a/jskparser/ast/body/annotationmemberdeclaration.py
+++ b/jskparser/ast/body/annotationmemberdeclaration.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .typedeclaration import TypeDeclaration
diff --git a/jskparser/ast/body/axiomdeclaration.py b/jskparser/ast/body/axiomdeclaration.py
index 61ca44d..387b465 100644
--- a/jskparser/ast/body/axiomdeclaration.py
+++ b/jskparser/ast/body/axiomdeclaration.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from ..body.bodydeclaration import BodyDeclaration
@@ -18,13 +19,11 @@ def __init__(self, kwargs={}):
 
         # List<AxiomParameter> parameters
         params = kwargs.get(u'parameters', [])
-        self._parameters = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                               params.get(u'@e', [])) if params else []
+        self._parameters = [locs[x[u'@t']](x) if u'@t' in x else [] for x in params.get(u'@e', [])] if params else []
 
         # List<TypeParameter>
         typeParameters = kwargs.get(u'typeParameters', [])
-        self._typeParameters = map(lambda x: TypeParameter(x) if u'@t' in x else [],
-                                   typeParameters.get(u'@e', [])) if typeParameters else []
+        self._typeParameters = [TypeParameter(x) if u'@t' in x else [] for x in typeParameters.get(u'@e', [])] if typeParameters else []
         
         # BlockStmt body;
         body = kwargs.get(u'body')
@@ -35,8 +34,8 @@ def __init__(self, kwargs={}):
 
         self.add_as_parent(self.parameters+[self.typee]+[self.body])
         # if self._body and self._body.childrenNodes:
-        #     chs = filter(lambda c: not isinstance(c, Comment), self._body.childrenNodes)
-        #     if chs: chs[0].in_set = set(map(lambda x: x.lbl, self._parameters))
+        #     chs = [c for c in self._body.childrenNodes if not isinstance(c, Comment)]
+        #     if chs: chs[0].in_set = set([x.lbl for x in self._parameters])
 
     @property
     def typeParameters(self): return self._typeParameters
@@ -75,13 +74,13 @@ def name(self, v): self._name = v
 
     def adtName(self):
         typs = self.iddTypes()
-        return '_'.join([self.name] + map(str, typs))
+        return '_'.join([self.name] + [str(t) for t in typs])
         
     def iddTypes(self):
-        return map(lambda i: i.idd.typee, filter(lambda p: p.idd, self.parameters))
+        return [i.idd.typee for i in [p for p in self.parameters if p.idd]]
 
-    def param_typs(self): return map(lambda p: p.typee, self.parameters)
-    def param_names(self): return map(lambda p: p.name, self.parameters)
+    def param_typs(self): return [p.typee for p in self.parameters]
+    def param_names(self): return [p.name for p in self.parameters]
 
     def sig(self):
         return 'a{}'.format(str(self))
@@ -106,7 +105,7 @@ def ptypes():
                 else: params.append(str(p.method.typee))
             return params
 
-        pots = filter(lambda m: m.name == self.name and len(m.parameters) == len(self.parameters)-1, adt_mtds)
+        pots = [m for m in adt_mtds if m.name == self.name and len(m.parameters) == len(self.parameters)-1]
 
         name1 = u'_'.join([self.name] + ptypes())
         name2 = pots[0].name_no_nested(False) if len(pots) > 0 else ''
diff --git a/jskparser/ast/body/axiomparameter.py b/jskparser/ast/body/axiomparameter.py
index 1f65de3..f374912 100644
--- a/jskparser/ast/body/axiomparameter.py
+++ b/jskparser/ast/body/axiomparameter.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from ..node import Node
@@ -26,8 +27,7 @@ def __init__(self, kwargs={}):
 
         # List<AnnotationExpr> annotations;
         annotations = kwargs.get(u'annotations', [])
-        self._annotations = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                annotations.get(u'@e', [])) if annotations else []
+        self._annotations = [locs[x[u'@t']](x) if u'@t' in x else [] for x in annotations.get(u'@e', [])] if annotations else []
 
         self.add_as_parent([self.typee]+[self.annotations])
         if self._id: self.add_as_parent([self._id])
diff --git a/jskparser/ast/body/bodydeclaration.py b/jskparser/ast/body/bodydeclaration.py
index 1670090..14883a5 100644
--- a/jskparser/ast/body/bodydeclaration.py
+++ b/jskparser/ast/body/bodydeclaration.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from ..node import Node
@@ -12,8 +13,7 @@ def __init__(self, kwargs={}):
 
         # List<AnnotationExpr> annotations;
         annotations = kwargs.get(u'annotations', [])
-        self._annotations = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                annotations.get(u'@e', [])) if annotations else []
+        self._annotations = [locs[x[u'@t']](x) if u'@t' in x else [] for x in annotations.get(u'@e', [])] if annotations else []
         
     @property
     def annotations(self): return self._annotations
diff --git a/jskparser/ast/body/classorinterfacedeclaration.py b/jskparser/ast/body/classorinterfacedeclaration.py
index 692d7b5..5811244 100644
--- a/jskparser/ast/body/classorinterfacedeclaration.py
+++ b/jskparser/ast/body/classorinterfacedeclaration.py
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
+from __future__ import print_function
 from . import _import
 
 from .typedeclaration import TypeDeclaration
@@ -18,8 +20,7 @@ def __init__(self, kwargs={}):
 
         # List<TypeParameters>
         typeParameters = kwargs.get(u'typeParameters', [])
-        self._typeParameters = map(lambda x: TypeParameter(x) if u'@t' in x else [],
-                                  typeParameters.get(u'@e', [])) if typeParameters else []
+        self._typeParameters = [TypeParameter(x) if u'@t' in x else [] for x in typeParameters.get(u'@e', [])] if typeParameters else []
 
         # Can contain more than one item if this is an interface
         # List<ClassOrInterfaceType>
@@ -38,9 +39,9 @@ def __init__(self, kwargs={}):
         self._axiom = False
         self._box = False        
         if self.annotations:
-            # self._axiom = any(map(lambda a: str(a) == 'axiomClass', self.annotations))
-            self._axiom = any(map(lambda a: str(a) == 'rewriteClass', self.annotations))
-            self._box = any(map(lambda a: str(a) == 'autoBox', self.annotations))
+            # self._axiom = any([str(a) == 'axiomClass' for a in self.annotations])
+            self._axiom = any([str(a) == 'rewriteClass' for a in self.annotations])
+            self._box = any([str(a) == 'autoBox' for a in self.annotations])
 
         self.add_as_parent(self.typeParameters+self.extendsList+self.implementsList+self.subClasses)
 
@@ -68,7 +69,7 @@ def get_sups(n):
                         # logging.warning('class {} extends unknown type {}'.format(n.name, e.name))
                     else: sups.append(sc)
                 else:
-                    print 'ERROR: class {} not in symbol table of {}'.format(e.name, n.name) # library?
+                    print('ERROR: class {} not in symbol table of {}'.format(e.name, n.name)) # library?
                     return
             for i in n.implementsList:
                 ic = n.symtab.get(i.name)
@@ -78,10 +79,11 @@ def get_sups(n):
                         # logging.warning('class {} implements type (no class def) {}'.format(str(self), i.name))
                     else: sups.append(ic)
                 else:
-                    print 'ERROR: class {} not in symbol table of {}'.format(e.name, n.name) # library?
+                    print('ERROR: class {} not in symbol table of {}'.format(e.name, n.name)) # library?
                     continue
             lst.extend(sups)
-            map(get_sups, sups)
+            for sup in sups:
+                get_sups(sup)
         get_sups(self)
         return lst
 
@@ -112,7 +114,7 @@ def subClasses(self, v): self._subClasses = v
 
     @property
     def fullname(self):
-        return '_'.join(map(lambda c: c.name, self.enclosing_types()) + [self.name])
+        return '_'.join([c.name for c in self.enclosing_types()] + [self.name])
     @fullname.setter
     def fullname(self, v): self._fullname = v
 
diff --git a/jskparser/ast/body/constructordeclaration.py b/jskparser/ast/body/constructordeclaration.py
index 0001b25..662fb39 100644
--- a/jskparser/ast/body/constructordeclaration.py
+++ b/jskparser/ast/body/constructordeclaration.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .bodydeclaration import BodyDeclaration
 
 from ..type.classorinterfacetype import ClassOrInterfaceType
@@ -20,21 +21,18 @@ def __init__(self, kwargs={}):
     
         # List<Parameter>
         params = kwargs.get(u'parameters', {})
-        self._parameters = map(lambda x: locs[x[u'@t']](x),
-                               params.get(u'@e', [])) if params else []
+        self._parameters = [locs[x[u'@t']](x) for x in params.get(u'@e', [])] if params else []
 
         # List<TypeParameter>
         typeParameters = kwargs.get(u'typeParameters', {})
-        self._typeParameters = map(lambda x: TypeParameter(x) if u'@t' in x else [],
-                                   typeParameters.get(u'@e', [])) if typeParameters else []
+        self._typeParameters = [TypeParameter(x) if u'@t' in x else [] for x in typeParameters.get(u'@e', [])] if typeParameters else []
 
         # Type (just the class name wrapped in a Type)
         self._type = ClassOrInterfaceType(kwargs.get(u'name',{}))
     
         # List<NameExpr> throws_;
         throws = kwargs.get(u'throws_', {})
-        self._throws = map(lambda x: locs[u'NameExpr'](x) if u'@t' in x else [],
-                           throws.get(u'@e', [])) if throws else []
+        self._throws = [locs[u'NameExpr'](x) if u'@t' in x else [] for x in throws.get(u'@e', [])] if throws else []
     
         # BlockStmt block;
         body = kwargs.get(u'block')
@@ -80,8 +78,8 @@ def typeParameters(self): return self._typeParameters
     @typeParameters.setter
     def typeParameters(self, v): self._typeParameters = v
   
-    def param_typs(self): return map(lambda p: p.typee, self.parameters)
-    def param_names(self): return map(lambda p: p.name, self.parameters)
+    def param_typs(self): return [p.typee for p in self.parameters]
+    def param_names(self): return [p.name for p in self.parameters]
 
     def sig(self):
         return 'm{}'.format(str(self))
@@ -90,5 +88,5 @@ def __str__(self):
         cls = self.get_coid()
         nm = '{0}_{0}'.format(str(cls))
         if cls.isinner(): nm += '_{}'.format(str(cls.get_coid()))
-        params = map(self.sanitize_ty, map(lambda p: p.typee.name, self.parameters))
+        params = [self.sanitize_ty(p.typee.name) for p in self.parameters]
         return u'_'.join([nm] + params)
diff --git a/jskparser/ast/body/fielddeclaration.py b/jskparser/ast/body/fielddeclaration.py
index 1b07572..155a040 100644
--- a/jskparser/ast/body/fielddeclaration.py
+++ b/jskparser/ast/body/fielddeclaration.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 from .bodydeclaration import BodyDeclaration
 
diff --git a/jskparser/ast/body/initializerdeclaration.py b/jskparser/ast/body/initializerdeclaration.py
index d1cfe41..6018062 100644
--- a/jskparser/ast/body/initializerdeclaration.py
+++ b/jskparser/ast/body/initializerdeclaration.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
-from bodydeclaration import BodyDeclaration
+from __future__ import absolute_import
+from .bodydeclaration import BodyDeclaration
 
 IMPORTS = vars()
 
diff --git a/jskparser/ast/body/methoddeclaration.py b/jskparser/ast/body/methoddeclaration.py
index d240263..4dec410 100644
--- a/jskparser/ast/body/methoddeclaration.py
+++ b/jskparser/ast/body/methoddeclaration.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .bodydeclaration import BodyDeclaration
@@ -24,29 +25,26 @@ def __init__(self, kwargs={}):
         # List<Parameter> parameters
         params = kwargs.get(u'parameters', [])
         self._params = params
-        self._parameters = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                               params.get(u'@e', [])) if params else []
+        self._parameters = [locs[x[u'@t']](x) if u'@t' in x else [] for x in params.get(u'@e', [])] if params else []
 
         # List<TypeParameter>
         typeParameters = kwargs.get(u'typeParameters', [])
-        self._typeParameters = map(lambda x: TypeParameter(x) if u'@t' in x else [],
-                                   typeParameters.get(u'@e', [])) if typeParameters else []
+        self._typeParameters = [TypeParameter(x) if u'@t' in x else [] for x in typeParameters.get(u'@e', [])] if typeParameters else []
 
         # int arrayCount;
         self._arrayCount = kwargs.get(u'arrayCount', 0)
 
         # List<ReferenceType> throws_;
         throws = kwargs.get(u'throws_', [])
-        self._throws = map(lambda x: locs[u'ReferenceType'](x) if u'@t' in x else [],
-                           throws.get(u'@e', [])) if throws else []
+        self._throws = [locs[u'ReferenceType'](x) if u'@t' in x else [] for x in throws.get(u'@e', [])] if throws else []
 
         # BlockStmt body;
         body = kwargs.get(u'body')
         self._body = locs[u'BlockStmt'](body) if body else None
 
         if self._body and self._body.childrenNodes:
-            chs = filter(lambda c: not isinstance(c, Comment), self._body.childrenNodes)
-            if chs: chs[0].in_set = set(map(lambda x: x.lbl, self._parameters))
+            chs = [c for c in self._body.childrenNodes if not isinstance(c, Comment)]
+            if chs: chs[0].in_set = set([x.lbl for x in self._parameters])
 
         self._adt = False
         self._pure = False
@@ -56,13 +54,13 @@ def __init__(self, kwargs={}):
         self._boxedArgs = []
         self._is_bang = False
         if self.annotations:
-            # self._adt = any(map(lambda a: str(a) == 'adt', self.annotations))
-            self._adt = any(map(lambda a: str(a) == 'alg', self.annotations))
-            self._pure = any(map(lambda a: str(a) == 'pure', self.annotations))
-            self._default = any(map(lambda a: str(a) == 'default', self.annotations))
-            self._constructor = any(map(lambda a: str(a) == 'constructor', self.annotations))
-            self._boxedRet = any(map(lambda a: str(a) == 'boxedRet', self.annotations))
-            self._boxedArgs = map(lambda m: int(m.memberValue.value), filter(lambda a: str(a) == 'boxedArgs', self.annotations))
+            # self._adt = any([str(a) == 'adt' for a in self.annotations])
+            self._adt = any([str(a) == 'alg' for a in self.annotations])
+            self._pure = any([str(a) == 'pure' for a in self.annotations])
+            self._default = any([str(a) == 'default' for a in self.annotations])
+            self._constructor = any([str(a) == 'constructor' for a in self.annotations])
+            self._boxedRet = any([str(a) == 'boxedRet' for a in self.annotations])
+            self._boxedArgs = [int(m.memberValue.value) for m in [a for a in self.annotations if str(a) == 'boxedArgs']]
 
         self._bang = kwargs.get(u'bang', False)
         self._adtType = kwargs.get(u'adtType', False)
@@ -168,8 +166,8 @@ def adtName(self): return self._adtName
     @adtName.setter
     def adtName(self, v): self._adtName = v
 
-    def param_typs(self): return map(lambda p: p.typee, self.parameters)
-    def param_names(self): return map(lambda p: p.name, self.parameters)
+    def param_typs(self): return [p.typee for p in self.parameters]
+    def param_names(self): return [p.name for p in self.parameters]
 
     def get_xform(self):
         from .xform import Xform
@@ -208,7 +206,7 @@ def ptypes():
                 typ = ''
                 if p.idd: typ = str(p.typee.name)
                 else: typ = str(p.method.typee)
-                # if typ.capitalize() in map(str, self.parentNode.typeParameters):
+                # if typ.capitalize() in list(map(str, self.parentNode.typeParameters)):
                 #     print("\t\tHERE43: "+str(typ.capitalize()))
                 #     typ = u'Object'
                 params.append(typ)
@@ -221,7 +219,7 @@ def __str__(self):
             name = '_'.join(name.split('_')[:2])
             # return self.name_no_nested(False)
         
-        params = map(self.sanitize_ty, map(lambda p: p.typee.name, self.parameters))
+        params = [self.sanitize_ty(p.typee.name) for p in self.parameters]
         if self.adt:
             params = ["Object"]+params
 
diff --git a/jskparser/ast/body/parameter.py b/jskparser/ast/body/parameter.py
index 4f64462..c654444 100644
--- a/jskparser/ast/body/parameter.py
+++ b/jskparser/ast/body/parameter.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from ..node import Node
 
 from . import _import
@@ -27,8 +28,7 @@ def __init__(self, kwargs={}):
 
         # List<AnnotationExpr> annotations;
         annotations = kwargs.get(u'annotations', [])
-        self._annotations = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                annotations.get(u'@e', [])) if annotations else []
+        self._annotations = [locs[x[u'@t']](x) if u'@t' in x else [] for x in annotations.get(u'@e', [])] if annotations else []
 
         self.add_as_parent([self.idd])
 
diff --git a/jskparser/ast/body/typedeclaration.py b/jskparser/ast/body/typedeclaration.py
index 0fb26eb..0221b61 100644
--- a/jskparser/ast/body/typedeclaration.py
+++ b/jskparser/ast/body/typedeclaration.py
@@ -1,9 +1,10 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 from .. import Modifiers
 
-from bodydeclaration import BodyDeclaration
+from .bodydeclaration import BodyDeclaration
 
 class TypeDeclaration(BodyDeclaration):
     def __init__(self, kwargs={}):
@@ -15,8 +16,7 @@ def __init__(self, kwargs={}):
     
         # List<BodyDeclaration>
         self._members = []
-        self._members.extend(map(lambda x: locs[x[u'@t']](x),
-                            kwargs.get(u'members', {}).get(u'@e', [])))
+        self._members.extend([locs[x[u'@t']](x) for x in kwargs.get(u'members', {}).get(u'@e', [])])
     
         self.add_as_parent(self.members)
     
diff --git a/jskparser/ast/body/variabledeclarator.py b/jskparser/ast/body/variabledeclarator.py
index 9e88a1b..ce07451 100644
--- a/jskparser/ast/body/variabledeclarator.py
+++ b/jskparser/ast/body/variabledeclarator.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from ..node import Node
diff --git a/jskparser/ast/body/xform.py b/jskparser/ast/body/xform.py
index 39bcc0d..208ae97 100644
--- a/jskparser/ast/body/xform.py
+++ b/jskparser/ast/body/xform.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .. import Modifiers
@@ -17,7 +18,7 @@
 
 from ..utils import utils
 
-from axiomparameter import AxiomParameter
+from .axiomparameter import AxiomParameter
 
 # This is just going to be a child of MethodDeclaration and allow for special handling of
 # the switch statements
@@ -140,7 +141,7 @@ def gen_switch(self, adt_mtds, depth, arg, cls, mtd, args, is_ax_cls, mtd_name,
         # print("HERE: "+str(mtd_name).lower())
         # for a in adt_mtds:
         #     print("\t: "+str(a.name).lower())
-        current_mtds = filter(lambda m: m.adt and str(m.name).lower() == str(mtd_name).lower(), mtds)
+        current_mtds = [m for m in mtds if m.adt and str(m.name).lower() == str(mtd_name).lower()]
 
         # name = u'selff'
         name = str(arg.name)
@@ -191,8 +192,8 @@ def gen_switch(self, adt_mtds, depth, arg, cls, mtd, args, is_ax_cls, mtd_name,
                       u'right': {u'@t':u'NullLiteralExpr',},
                       u'op': {u'name': u'equals',},}
         
-        adt_mtd = filter(lambda m: str(m.name).lower() == str(self.name.split('_')[1]).lower() or str(m.name).lower() + u'b' == str(self.name.split('_')[1]).lower(), mtds)[0]        
-        # adt_mtd = filter(lambda m: m.adt and m.name == a.name, mtds)[0]        
+        adt_mtd = [m for m in mtds if str(m.name).lower() == str(self.name.split('_')[1]).lower() or str(m.name).lower() + u'b' == str(self.name.split('_')[1]).lower()][0]
+        # adt_mtd = [m for m in mtds if m.adt and m.name == a.name][0]
         
         ret_val = u'new '+str(mtd.name).lower().capitalize()+u'(self=selff._'+str(cls).lower()
         for ap,mp in zip(adt_mtd.parameters, args[1:]):
@@ -279,7 +280,8 @@ def build_switch(self, cases, body, adt_mtds, depth, arg_num, args, switch, cls,
                     b.stmts = body
                     s.stmts = [b]
                     b.add_parent_post(s, True)
-                    map(lambda s: s.add_parent_post(b), body)                       
+                    for s in body:
+                        s.add_parent_post(b)
                 else:
                     b = BlockStmt()
                     switch2 = s.stmts[0].stmts[0] if len(s.stmts) > 0 else None
@@ -288,7 +290,8 @@ def build_switch(self, cases, body, adt_mtds, depth, arg_num, args, switch, cls,
                     b.stmts = body
                     s.stmts = [b]
                     b.add_parent_post(s, True)
-                    map(lambda s: s.add_parent_post(b), body)                         
+                    for s in body:
+                        s.add_parent_post(b)
         
         return new_block
         
@@ -308,7 +311,8 @@ def add_body(self, cases, body, adt_mtds):
                     b.stmts = body
                     s.stmts = [b]
                     b.add_parent_post(s, True)
-                    map(lambda s: s.add_parent_post(b), body)                       
+                    for s in body:
+                        s.add_parent_post(b)
 
     def create_normal_body(self, body):
         self.normal_body = True
@@ -337,7 +341,8 @@ def add_body_nested(self, casess, body, adt_mtds, args, cls, a, is_ax_cls):
                     b.stmts = body
                     s.stmts = [b]
                     b.add_parent_post(s, True)
-                    map(lambda s: s.add_parent_post(b), body)                       
+                    for s in body:
+                        s.add_parent_post(b)
                 else:
                     b = BlockStmt()
                     switch = s.stmts[0].stmts[0] if len(s.stmts) > 0 else None
@@ -346,7 +351,8 @@ def add_body_nested(self, casess, body, adt_mtds, args, cls, a, is_ax_cls):
                     b.stmts = body
                     s.stmts = [b]
                     b.add_parent_post(s, True)
-                    map(lambda s: s.add_parent_post(b), body)                       
+                    for s in body:
+                        s.add_parent_post(b)
 
     # def areNamesEqual(self, 
                     
diff --git a/jskparser/ast/comments/comment.py b/jskparser/ast/comments/comment.py
index c961807..145bdd6 100644
--- a/jskparser/ast/comments/comment.py
+++ b/jskparser/ast/comments/comment.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from ..node import Node
 
 from . import _import
diff --git a/jskparser/ast/compilationunit.py b/jskparser/ast/compilationunit.py
index e9cf509..3a2b18e 100644
--- a/jskparser/ast/compilationunit.py
+++ b/jskparser/ast/compilationunit.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
-from node import Node
+from __future__ import absolute_import
+from .node import Node
 from . import _import
 
 class CompilationUnit(Node):
@@ -15,14 +16,14 @@ def __init__(self, kwargs={}):
       
         # List<ImportDeclaration>
         imports = kwargs.get('imports')
-        self._imports = map(lambda x: locs[u'ImportDeclaration'](x),
-                            imports.get('@e', [])) if imports else []
+        self._imports = [locs[u'ImportDeclaration'](x) for x in
+                         imports.get('@e', [])] if imports else []
         
         # for i in self._imports: print i.name
         # List<TypeDeclaration>
         types = kwargs.get('types')
-        self._types = map(lambda x: locs[x['@t']](x),
-                          types.get('@e', [])) if types else []
+        self._types = [locs[x['@t']](x) for x in
+                       types.get('@e', [])] if types else []
         self._gsymtab = self.GSYMTAB
           
     @property
diff --git a/jskparser/ast/dataflow/dataflow.py b/jskparser/ast/dataflow/dataflow.py
index 8b521a6..4bfb616 100644
--- a/jskparser/ast/dataflow/dataflow.py
+++ b/jskparser/ast/dataflow/dataflow.py
@@ -1,5 +1,11 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
+from __future__ import print_function
+try: unicode
+except: unicode = u"".__class__
+try: xrange
+except: xrange = range
 from ..utils import utils
 
 from ..body.methoddeclaration import MethodDeclaration
@@ -61,14 +67,14 @@ def analyze(self, program, gsymtab, kwargs):
                     return None, None
         if verbose:
             def f1(node):
-                print 'node:', type(node), 'name:', node.name, \
+                print('node:', type(node), 'name:', node.name, \
                     '\n\tin:', node.in_set, \
                     '\n\tout:', node.out_set, \
                     '\n\tinputs:', node.inputs, \
-                    '\n\toutputs:', node.outputs
-                print
+                    '\n\toutputs:', node.outputs)
+                print()
             self._walk(f1, self._program)
-            if inputs: print ins, outs
+            if inputs: print(ins, outs)
         return ins, outs
 
     def _doreach(self, program=None):
@@ -138,9 +144,9 @@ def _compute_in_out(self, n):
 
         t = n.gen().union((self._minus(n.in_set, n.kill())))
         if self._debug:
-            print 'n:', n, 'in:', n.in_set, 'gen:', n.gen(), 'kill:', n.kill(), \
+            print('n:', n, 'in:', n.in_set, 'gen:', n.gen(), 'kill:', n.kill(), \
                 'in-kill', self._minus(n.in_set, n.kill()), 't:', t, \
-                'out_set:', n.out_set
+                'out_set:', n.out_set)
 
         if type(n.parentNode) == ForStmt:
             inits = set(utils.flatten([e.out_set for e in n.parentNode.init])) \
@@ -161,7 +167,7 @@ def _compute_in_out(self, n):
             names = utils.extract_nodes([NameExpr], n)
             names = [nm.name for nm in names]
             # TODO: can return more than one name, don't know if that makes sense
-            n.out_set = set(filter(lambda x: x[0] in names, n.in_set))
+            n.out_set = set([x for x in n.in_set if x[0] in names])
 
         # out_set has changed. out_set of these are handled above
         elif t != n.out_set and type(n) not in NO_OUT:
@@ -177,12 +183,12 @@ def _compute_in_out(self, n):
     def _inputs(self, n, c_defs):
         for ch in n.childrenNodes:
             self._inputs(ch, c_defs)
-            reach_x = filter(lambda x: x[0] == ch.lbl[0], ch.in_set)
-            ins = self._rm_dups(filter(lambda x: x in c_defs, reach_x))
+            reach_x = [x for x in ch.in_set if x[0] == ch.lbl[0]]
+            ins = self._rm_dups([x for x in reach_x if x in c_defs])
             if self._debug:
-                print 'ch:', ch, 'ch.in_set:', ch.in_set, \
+                print('ch:', ch, 'ch.in_set:', ch.in_set, \
                     'reach_x:', reach_x, \
-                    'c_defs:', c_defs, 'ins:', ins
+                    'c_defs:', c_defs, 'ins:', ins)
             if ins: ch.inputs = list(ins)
             # all this crap is to remove duplicate var defs from in/out sets
             if ch.inputs:
@@ -198,10 +204,10 @@ def _gen_inputs(self, method):
         ctx.childrenNodes = body[:self._estart]
         e = BlockStmt()
         e.childrenNodes = body[self._estart:self._estop + 1]
-        if self._debug: print '*******inputs*******'
+        if self._debug: print('*******inputs*******')
 
         # need to add this to the initial context if it is at the start of method
-        params = map(lambda x: x.lbl, method.parameters)
+        params = [x.lbl for x in method.parameters]
         # c_defs are all the defs leaving the context. defs in e will have to
         # be part of this set to be valid inputs
         c_defs = ctx.childrenNodes[-1].out_set.union(set(params)) if ctx.childrenNodes else set(params)
@@ -211,16 +217,17 @@ def _gen_inputs(self, method):
         # inputs to context, which are outputs from e
         ctx.childrenNodes = body[self._estop + 1:]
         if ctx.childrenNodes:
-            if self._debug: print '*******outputs******'
+            if self._debug: print('*******outputs******')
 
             c_defs = e.childrenNodes[-1].out_set.difference(e.childrenNodes[0].in_set)
             self._inputs(ctx, c_defs)
 
             e.childrenNodes[-1].outputs = []
             ins = set([])
-            map(lambda x: ins.update(x.inputs), ctx.childrenNodes)
+            for x in ctx.childrenNodes:
+                ins.update(x.inputs)
             if ins:
-                e.childrenNodes[-1].outputs = [map(lambda t: t.name, map(self.get_typ, list(self._rm_dups(ins))))[0]]
+                e.childrenNodes[-1].outputs = [[self.get_typ(i).name for i in list(self._rm_dups(ins))][0]]
         else:
             if utils.extract_nodes([ReturnStmt], e):
                 e.childrenNodes[-1].outputs = [unicode(method.typee)]
@@ -228,11 +235,12 @@ def _gen_inputs(self, method):
         # we need all the inputs for all the childrenNodes of e
         # TODO: can we assume we can just smash all the inputs together?
         ins = set([])
-        map(lambda x: ins.update(x.inputs), e.childrenNodes)
+        for x in e.childrenNodes:
+            ins.update(x.inputs)
         def to_nm(n):
-            n.inputs = map(lambda t: t.name, map(self.get_typ, n.inputs))
+            n.inputs = [self.get_typ(i).name for i in n.inputs]
         self._walk(to_nm, e)
-        e.childrenNodes[0].inputs = map(lambda t: t.name, map(self.get_typ, ins))
+        e.childrenNodes[0].inputs = [self.get_typ(i).name for i in ins]
         return e.childrenNodes[0].inputs, e.childrenNodes[-1].outputs
         
     def get_typ(self, lbl):
@@ -257,12 +265,12 @@ def _minus(self, inn, kill):
         elif not kill: return set(inn)
         s = cp.copy(inn)
         for k in kill:
-            s = filter(lambda x: x[0] != k[0], s)
+            s = [x for x in s if x[0] != k[0]]
         return s
 
     def _intersection(self, s0, s1):
-        names = map(lambda x: x[0], list(s0))
-        return set(filter(lambda x: x[0] in names, list(s1)))
+        names = [x[0] for x in list(s0)]
+        return set([x for x in list(s1) if x[0] in names])
 
     def _wappend(self, n, *args):
         self._worklist.append(n)
diff --git a/jskparser/ast/expr/arrayaccessexpr.py b/jskparser/ast/expr/arrayaccessexpr.py
index 5752529..c182e8e 100644
--- a/jskparser/ast/expr/arrayaccessexpr.py
+++ b/jskparser/ast/expr/arrayaccessexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
diff --git a/jskparser/ast/expr/arraycreationexpr.py b/jskparser/ast/expr/arraycreationexpr.py
index e3cfa7b..e5e7151 100644
--- a/jskparser/ast/expr/arraycreationexpr.py
+++ b/jskparser/ast/expr/arraycreationexpr.py
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
+from __future__ import print_function
 from .expression import Expression
 
 from . import _import
@@ -22,15 +24,15 @@ def __init__(self, kwargs={}):
     
         # List<Expression> dimensions;
         dim = kwargs.get(u'dimensions', {})
-        self._dimensions = map(lambda e: locs[e[u'@t']](e) if u'@t' in e else [],
-                               dim.get(u'@e', [])) if dim else []
+        self._dimensions = [locs[e[u'@t']](e) if u'@t' in e else [] for e in
+                               dim.get(u'@e', [])] if dim else []
     
         # List<List<AnnotationExpr>> arraysAnnotations;
         self._arraysAnnotations = []
         aa = kwargs.get(u'arraysAnnotations', {})
         ad = [None] if not aa else aa.get(u'@e')
         if ad[0]:
-            print 'ReferenceType annotations not implemented'
+            print('ReferenceType annotations not implemented')
             for a in aa:
                 self._arraysAnnotations.append(locs[u'AnnotationExpr'](a) if a else None)
                 
diff --git a/jskparser/ast/expr/arrayinitializerexpr.py b/jskparser/ast/expr/arrayinitializerexpr.py
index ea56449..52ac1bb 100644
--- a/jskparser/ast/expr/arrayinitializerexpr.py
+++ b/jskparser/ast/expr/arrayinitializerexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
@@ -11,8 +12,8 @@ def __init__(self, kwargs={}):
     
         # List<Expression> values;
         v = kwargs.get(u'values', {})
-        self._values = map(lambda e: locs[e[u'@t']](e) if u'@t' in e else [],
-                           v.get(u'@e', [])) if v else []
+        self._values = [locs[e[u'@t']](e) if u'@t' in e else [] for e in
+                           v.get(u'@e', [])] if v else []
 
         self.add_as_parent(self.values)
                     
diff --git a/jskparser/ast/expr/assignexpr.py b/jskparser/ast/expr/assignexpr.py
index 34eb6c0..b06bbaf 100644
--- a/jskparser/ast/expr/assignexpr.py
+++ b/jskparser/ast/expr/assignexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 from . import _import
 
diff --git a/jskparser/ast/expr/binaryexpr.py b/jskparser/ast/expr/binaryexpr.py
index dcd8bcf..e217aa0 100644
--- a/jskparser/ast/expr/binaryexpr.py
+++ b/jskparser/ast/expr/binaryexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .expression import Expression
diff --git a/jskparser/ast/expr/castexpr.py b/jskparser/ast/expr/castexpr.py
index fc9be49..751f26c 100644
--- a/jskparser/ast/expr/castexpr.py
+++ b/jskparser/ast/expr/castexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
diff --git a/jskparser/ast/expr/conditionalexpr.py b/jskparser/ast/expr/conditionalexpr.py
index 3e9df55..f4d4a08 100644
--- a/jskparser/ast/expr/conditionalexpr.py
+++ b/jskparser/ast/expr/conditionalexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
diff --git a/jskparser/ast/expr/enclosedexpr.py b/jskparser/ast/expr/enclosedexpr.py
index e3bcab4..df7f823 100644
--- a/jskparser/ast/expr/enclosedexpr.py
+++ b/jskparser/ast/expr/enclosedexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
diff --git a/jskparser/ast/expr/expression.py b/jskparser/ast/expr/expression.py
index 5bd0611..5e8a0cc 100644
--- a/jskparser/ast/expr/expression.py
+++ b/jskparser/ast/expr/expression.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from ..node import Node
diff --git a/jskparser/ast/expr/fieldaccessexpr.py b/jskparser/ast/expr/fieldaccessexpr.py
index 50636e7..b086f36 100644
--- a/jskparser/ast/expr/fieldaccessexpr.py
+++ b/jskparser/ast/expr/fieldaccessexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
diff --git a/jskparser/ast/expr/generatorexpr.py b/jskparser/ast/expr/generatorexpr.py
index 089cb30..5f56a6f 100644
--- a/jskparser/ast/expr/generatorexpr.py
+++ b/jskparser/ast/expr/generatorexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .expression import Expression
@@ -17,8 +18,8 @@ def __init__(self, kwargs={}):
 
         # List Expression
         exprs = kwargs.get(u'exprs', {})
-        self._exprs = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                          exprs.get(u'@e', [])) if exprs else []
+        self._exprs = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                          exprs.get(u'@e', [])] if exprs else []
 
         self.add_as_parent(self.exprs)
 
diff --git a/jskparser/ast/expr/instanceofexpr.py b/jskparser/ast/expr/instanceofexpr.py
index 6db680c..cfd428b 100644
--- a/jskparser/ast/expr/instanceofexpr.py
+++ b/jskparser/ast/expr/instanceofexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
diff --git a/jskparser/ast/expr/methodcallexpr.py b/jskparser/ast/expr/methodcallexpr.py
index 22bf50f..84c878d 100644
--- a/jskparser/ast/expr/methodcallexpr.py
+++ b/jskparser/ast/expr/methodcallexpr.py
@@ -1,5 +1,10 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
+try: xrange
+except: xrange = range
 import itertools
 
 from . import _import
@@ -30,8 +35,8 @@ def __init__(self, kwargs={}):
 
         # List<Expression> args;
         args = kwargs.get(u'args', {})
-        self._args = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                         args.get(u'@e', [])) if args else []
+        self._args = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                         args.get(u'@e', [])] if args else []
 
         self.add_as_parent([self.scope]+self.args)
 
@@ -121,12 +126,12 @@ def typee(self):
                     nm = self.sig().split('_')
                     args = nm[1:]
                     nm = nm[0]
-                    tps = map(str, cls.typeParameters)
+                    tps = [str(p) for p in cls.typeParameters]
                     if len(args) == 1:
-                        nms = map(lambda n: '_'.join([nm, n]), tps)
+                        nms = ['_'.join([nm, n]) for n in tps]
                     else:
-                        nms = map(lambda n: '_'.join([nm]+list(n)), list(itertools.chain(itertools.product(tps,args), itertools.product(args,tps))))
-                        nms.extend(map(lambda n: '_'.join([nm]+list(n)), list(itertools.chain(itertools.product(tps, tps)))))
+                        nms = ['_'.join([nm]+list(n)) for n in list(itertools.chain(itertools.product(tps,args), itertools.product(args,tps)))]
+                        nms.extend(['_'.join([nm]+list(n)) for n in list(itertools.chain(itertools.product(tps, tps)))])
                     for n in nms:
                         if cls.symtab.get(n): return cls.symtab.get(n).typee
 
@@ -157,12 +162,12 @@ def identify_potentials(self, callexpr, cls):
         call_arg_typs = callexpr.arg_typs()
         for key,val in cls.symtab.items():
             if type(val) != MethodDeclaration: continue
-            tparam_names = map(lambda t: t.name, val.typeParameters)
-            tparam_names.extend(map(lambda t: t.name, val.get_coid().typeParameters))
+            tparam_names = [t.name for t in val.typeParameters]
+            tparam_names.extend([t.name for t in val.get_coid().typeParameters])
 
             if callexpr.name == val.name and len(callexpr.args) == len(val.parameters):
-                if all(map(lambda t: t[1].name in tparam_names or utils.is_subtype(t[0], t[1]),
-                           zip(call_arg_typs, val.param_typs()))):
+                if all([t[1].name in tparam_names or utils.is_subtype(t[0], t[1]) for t in
+                           zip(call_arg_typs, val.param_typs())]):
                     mtds.append(val)
         return mtds
 
@@ -177,7 +182,7 @@ def identify_strict(self, callexpr, mtds, **kwargs):
 
     def match_strict(self, arg_typs, param_typs, **kwargs):
         for atyp,ptyp in zip(arg_typs, param_typs):
-            if ptyp.name in map(lambda p: p.name, param_typs): continue
+            if ptyp.name in [p.name for p in param_typs]: continue
             if not (self.identity_conversion(atyp,ptyp) or \
                     self.primitive_widening(atyp,ptyp) or \
                     self.reference_widening(atyp,ptyp)):
@@ -196,8 +201,8 @@ def identify_loose(self, callexpr, mtds, **kwargs):
     def match_loose(self, arg_typs, param_typs, typeParameters):
         # TODO: Spec says if the result is a raw type, do an unchecked conversion. Does this already happen?
         for atyp,ptyp in zip(arg_typs, param_typs):
-            if ptyp.name in map(lambda p: p.name, param_typs): continue
-            if ptyp.name in map(lambda p: p.name, typeParameters) and not isinstance(atyp, PrimitiveType): continue
+            if ptyp.name in [p.name for p in param_typs]: continue
+            if ptyp.name in [p.name for p in typeParameters] and not isinstance(atyp, PrimitiveType): continue
             # going to ignore, identity and widenings b/c they should be caught with strict
             if not (self.boxing_conversion(atyp, ptyp) or \
                     (self.unboxing_conversion(atyp, ptyp) and \
@@ -209,8 +214,8 @@ def most(candidate, others):
             ctypes = candidate.param_typs()
             for i in range(len(others)):
                 # if the parameters of the candidate aren't less specific than all the parameters of other
-                if not all(map(lambda t: utils.is_subtype(t[0], t[1]), \
-                               zip(ctypes, others[i].param_typs()))):
+                if not all([utils.is_subtype(t[0], t[1]) for t in
+                            zip(ctypes, others[i].param_typs())]):
                     return False
             return True
         for mi in xrange(len(mtds)):
@@ -244,7 +249,7 @@ def typee(self, v): self._typee = v
 
     def sig(self):
         return 'm{}'.format(str(self))
-        # atyps = ','.join(map(str, self.arg_typs())) if self.args else ''
+        # atyps = ','.join([str(t) for t in self.arg_typs()]) if self.args else ''
         # return '{} {}({});'.format(str(self.typee), str(self), atyps)
         
     def arg_typs(self):
@@ -291,6 +296,6 @@ def __str__(self):
         name = self.name+'b' if self._add_bang else self.name
         if a:
             return '_'.join([self.sanitize_ty(name)] + \
-                            map(lambda a: self.sanitize_ty(a.name), a))
+                            [self.sanitize_ty(a.name) for a in a])
         else:
             return self.name        
diff --git a/jskparser/ast/expr/nameexpr.py b/jskparser/ast/expr/nameexpr.py
index e69ba97..54ad2f2 100644
--- a/jskparser/ast/expr/nameexpr.py
+++ b/jskparser/ast/expr/nameexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .expression import Expression
diff --git a/jskparser/ast/expr/objectcreationexpr.py b/jskparser/ast/expr/objectcreationexpr.py
index b0f1d5c..0af7c40 100644
--- a/jskparser/ast/expr/objectcreationexpr.py
+++ b/jskparser/ast/expr/objectcreationexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 from ..type.classorinterfacetype import ClassOrInterfaceType
 from ..body.classorinterfacedeclaration import ClassOrInterfaceDeclaration
@@ -24,20 +25,20 @@ def __init__(self, kwargs={}):
 
         # List<Type> typeArgs;
         typeArgs = kwargs.get(u'typeArgs', {})
-        self._typeArgs = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                             typeArgs.get(u'@e', [])) if typeArgs else []
+        self._typeArgs = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                             typeArgs.get(u'@e', [])] if typeArgs else []
 
         # List<Expression> args;
         args = kwargs.get(u'args', {})
         self._tmpargs = args
-        self._args = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                         args.get(u'@e', [])) if args else []
+        self._args = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                         args.get(u'@e', [])] if args else []
 
         # This can be null, to indicate there is no body
         # List<BodyDeclaration> anonymousClassBody;
         anon = kwargs.get(u'anonymousClassBody', {})
-        self._anonymousClassBody = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                       anon.get(u'@e', [])) if anon else []
+        self._anonymousClassBody = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                                       anon.get(u'@e', [])] if anon else []
 
         box = kwargs.get(u'box', {})
         self._box = box if box else False
diff --git a/jskparser/ast/expr/qualifiednameexpr.py b/jskparser/ast/expr/qualifiednameexpr.py
index 3535827..1056f9e 100644
--- a/jskparser/ast/expr/qualifiednameexpr.py
+++ b/jskparser/ast/expr/qualifiednameexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .nameexpr import NameExpr
diff --git a/jskparser/ast/expr/singlememberannotationexpr.py b/jskparser/ast/expr/singlememberannotationexpr.py
index 9ff8194..47b85c6 100644
--- a/jskparser/ast/expr/singlememberannotationexpr.py
+++ b/jskparser/ast/expr/singlememberannotationexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from .annotationexpr import AnnotationExpr
diff --git a/jskparser/ast/expr/unaryexpr.py b/jskparser/ast/expr/unaryexpr.py
index 0b29a91..5db9c60 100644
--- a/jskparser/ast/expr/unaryexpr.py
+++ b/jskparser/ast/expr/unaryexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .expression import Expression
 
 from . import _import
diff --git a/jskparser/ast/expr/variabledeclarationexpr.py b/jskparser/ast/expr/variabledeclarationexpr.py
index 5434edb..18b4868 100644
--- a/jskparser/ast/expr/variabledeclarationexpr.py
+++ b/jskparser/ast/expr/variabledeclarationexpr.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from ..body.variabledeclarator import VariableDeclarator
 from .expression import Expression
 from . import _import
@@ -18,14 +19,14 @@ def __init__(self, kwargs={}):
 
         # List<VariableDeclarator> vars
         var = kwargs.get(u'vars', {}).get(u'@e')
-        self._varss = map(lambda v: VariableDeclarator(v), var)
+        self._varss = [VariableDeclarator(v) for v in var]
 
         self._arrayCount = kwargs.get(u'arrayCount', 0)
 
         # List<AnnotationExpr> annotations
         annotations = kwargs.get(u'annotations', [])
-        self._annotations = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                annotations.get(u'@e', [])) if annotations else []
+        self._annotations = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                                annotations.get(u'@e', [])] if annotations else []
         
         self.add_as_parent([self.typee]+self.varss)
 
diff --git a/jskparser/ast/importdeclaration.py b/jskparser/ast/importdeclaration.py
index bd26c2a..a3ecbf0 100644
--- a/jskparser/ast/importdeclaration.py
+++ b/jskparser/ast/importdeclaration.py
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 
-from node import Node
+from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
+from .node import Node
 
 from . import _import
 
diff --git a/jskparser/ast/node.py b/jskparser/ast/node.py
index 29e9c59..d11f9c4 100644
--- a/jskparser/ast/node.py
+++ b/jskparser/ast/node.py
@@ -1,4 +1,7 @@
 #!/usr/bin/env python
+from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 import json
 
 from . import _import
@@ -51,8 +54,8 @@ def __init__(self, kwargs={}):
         
         # List<Comment> orphanComments
         orphanComments = kwargs.get(u'orphanComments', [])
-        self._orphanComments = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                   orphanComments.get(u'@e', [])) if orphanComments else []
+        self._orphanComments = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                                   orphanComments.get(u'@e', [])] if orphanComments else []
         # JavadocComment javadocComment;
         jdc = kwargs.get(u'javadoccomment', {})
         self._javadocComment = locs[u'JavadocComment'](jdc) if jdc else {}
@@ -246,7 +249,7 @@ def add_parent_post(self, p, recurse=True):
         if self not in p.childrenNodes: p.childrenNodes.append(self)
         self.parentNode = p
         if p.symtab and self.symtab:
-            self.symtab = dict(p.symtab.items() + self.symtab.items())
+            self.symtab = dict(list(p.symtab.items()) + list(self.symtab.items()))
         elif p.symtab:
             self.symtab = copy.copy(p.symtab)
 
diff --git a/jskparser/ast/stmt/assertstmt.py b/jskparser/ast/stmt/assertstmt.py
index 65056b3..c984518 100644
--- a/jskparser/ast/stmt/assertstmt.py
+++ b/jskparser/ast/stmt/assertstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 
 from . import _import
diff --git a/jskparser/ast/stmt/assumestmt.py b/jskparser/ast/stmt/assumestmt.py
index ba230b4..0cc01fb 100644
--- a/jskparser/ast/stmt/assumestmt.py
+++ b/jskparser/ast/stmt/assumestmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 
 from . import _import
diff --git a/jskparser/ast/stmt/blockstmt.py b/jskparser/ast/stmt/blockstmt.py
index e161113..7a83ee6 100644
--- a/jskparser/ast/stmt/blockstmt.py
+++ b/jskparser/ast/stmt/blockstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 from .statement import Statement
 
diff --git a/jskparser/ast/stmt/catchclause.py b/jskparser/ast/stmt/catchclause.py
index 4d1ee66..fec9fcb 100644
--- a/jskparser/ast/stmt/catchclause.py
+++ b/jskparser/ast/stmt/catchclause.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from . import _import
 
diff --git a/jskparser/ast/stmt/explicitconstructorinvocationstmt.py b/jskparser/ast/stmt/explicitconstructorinvocationstmt.py
index 7be37e0..9885c84 100644
--- a/jskparser/ast/stmt/explicitconstructorinvocationstmt.py
+++ b/jskparser/ast/stmt/explicitconstructorinvocationstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 from .statement import Statement
 
@@ -25,8 +26,8 @@ def __init__(self, kwargs={}):
         
         # List<Expression> args;
         args = kwargs.get(u'args', {})
-        self._args = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                         args.get(u'@e', [])) if args else []
+        self._args = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                         args.get(u'@e', [])] if args else []
 
         self.add_as_parent([self.expr]+self.args)
         
diff --git a/jskparser/ast/stmt/expressionstmt.py b/jskparser/ast/stmt/expressionstmt.py
index 7c9a4da..c241e82 100644
--- a/jskparser/ast/stmt/expressionstmt.py
+++ b/jskparser/ast/stmt/expressionstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from . import _import
 
diff --git a/jskparser/ast/stmt/foreachstmt.py b/jskparser/ast/stmt/foreachstmt.py
index 204e1aa..afd9f0b 100644
--- a/jskparser/ast/stmt/foreachstmt.py
+++ b/jskparser/ast/stmt/foreachstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from . import _import
 
diff --git a/jskparser/ast/stmt/forstmt.py b/jskparser/ast/stmt/forstmt.py
index 9cba31a..6efdef6 100644
--- a/jskparser/ast/stmt/forstmt.py
+++ b/jskparser/ast/stmt/forstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from . import _import
 
@@ -10,8 +11,8 @@ def __init__(self, kwargs={}):
     
         # List<Expression> init;
         init = kwargs.get(u'init', {})
-        self._init = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                         init.get(u'@e', [])) if init else []
+        self._init = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                         init.get(u'@e', [])] if init else []
         
         # Expression compare;
         compare = kwargs.get(u'compare', {})
@@ -19,8 +20,8 @@ def __init__(self, kwargs={}):
         
         # List<Expression> update;
         update = kwargs.get(u'update', {})
-        self._update = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                         update.get(u'@e', [])) if update else []
+        self._update = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                         update.get(u'@e', [])] if update else []
         
         # Statement body;
         body = kwargs.get(u'body', {})
diff --git a/jskparser/ast/stmt/ifstmt.py b/jskparser/ast/stmt/ifstmt.py
index a7cb29c..1b11228 100644
--- a/jskparser/ast/stmt/ifstmt.py
+++ b/jskparser/ast/stmt/ifstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 
 from . import _import
diff --git a/jskparser/ast/stmt/minrepeatstmt.py b/jskparser/ast/stmt/minrepeatstmt.py
index 584213c..6ee0bbb 100644
--- a/jskparser/ast/stmt/minrepeatstmt.py
+++ b/jskparser/ast/stmt/minrepeatstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from . import _import
 
diff --git a/jskparser/ast/stmt/returnstmt.py b/jskparser/ast/stmt/returnstmt.py
index 0943ec5..5bcf131 100644
--- a/jskparser/ast/stmt/returnstmt.py
+++ b/jskparser/ast/stmt/returnstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from ..expr.nameexpr import NameExpr
 from ..expr.literalexpr import LiteralExpr
diff --git a/jskparser/ast/stmt/switchentrystmt.py b/jskparser/ast/stmt/switchentrystmt.py
index 148ed40..ea6852b 100644
--- a/jskparser/ast/stmt/switchentrystmt.py
+++ b/jskparser/ast/stmt/switchentrystmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 
 from . import _import
@@ -15,8 +16,8 @@ def __init__(self, kwargs={}):
     
         # List<Statement> stmts;
         s = kwargs.get(u'stmts', {})
-        self._stmts = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                          s.get(u'@e', [])) if s else []
+        self._stmts = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                          s.get(u'@e', [])] if s else []
 
         self.add_as_parent([self.label]+self.stmts)
 
diff --git a/jskparser/ast/stmt/switchstmt.py b/jskparser/ast/stmt/switchstmt.py
index 75a9766..f1ce6f6 100644
--- a/jskparser/ast/stmt/switchstmt.py
+++ b/jskparser/ast/stmt/switchstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from .switchentrystmt import SwitchEntryStmt
 
@@ -16,7 +17,7 @@ def __init__(self, kwargs={}):
     
         # List<SwitchEntryStmt> entries;
         en = kwargs.get(u'entries', {}).get(u'@e')
-        self._entries = map(lambda e: SwitchEntryStmt(e), en) if en else []
+        self._entries = [SwitchEntryStmt(e) for e in en] if en else []
 
         self.add_as_parent([self.selector]+self.entries)
     
diff --git a/jskparser/ast/stmt/throwstmt.py b/jskparser/ast/stmt/throwstmt.py
index de29455..89159e4 100644
--- a/jskparser/ast/stmt/throwstmt.py
+++ b/jskparser/ast/stmt/throwstmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 
 from . import _import
diff --git a/jskparser/ast/stmt/trystmt.py b/jskparser/ast/stmt/trystmt.py
index a8324e3..c8dda36 100644
--- a/jskparser/ast/stmt/trystmt.py
+++ b/jskparser/ast/stmt/trystmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 from . import _import
 
@@ -10,8 +11,8 @@ def __init__(self, kwargs={}):
     
         # List<VariableDeclarationExpr> resources;
         resources = kwargs.get(u'resources', {})
-        self._resources = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                              resources.get(u'@e', [])) if resources else []
+        self._resources = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                              resources.get(u'@e', [])] if resources else []
     
         # BlockStmt tryBlock;
         tryBlock = kwargs.get(u'tryBlock', {})
@@ -19,8 +20,8 @@ def __init__(self, kwargs={}):
         
         # List<CatchClause> catchs;
         catchs = kwargs.get(u'catchs', [])
-        self._catchs = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                           catchs.get(u'@e', [])) if catchs else []
+        self._catchs = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                           catchs.get(u'@e', [])] if catchs else []
     
         # BlockStmt finallyBlock;
         finallyBlock = kwargs.get(u'finallyBlock', {})
diff --git a/jskparser/ast/stmt/whilestmt.py b/jskparser/ast/stmt/whilestmt.py
index bdd64cd..72bc82e 100644
--- a/jskparser/ast/stmt/whilestmt.py
+++ b/jskparser/ast/stmt/whilestmt.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from .statement import Statement
 
 from . import _import
diff --git a/jskparser/ast/type/referencetype.py b/jskparser/ast/type/referencetype.py
index 5713ac3..88df9e2 100644
--- a/jskparser/ast/type/referencetype.py
+++ b/jskparser/ast/type/referencetype.py
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
+from __future__ import print_function
 from .type import Type
 
 from . import _import
@@ -19,8 +21,8 @@ def __init__(self, kwargs={}):
         if type(v) == list:
             self._values = v
         else:
-            self._values = map(lambda e: locs[e[u'@t']](e) if u'@t' in e else [],
-                               v.get(u'@e', [])) if v else []
+            self._values = [locs[e[u'@t']](e) if u'@t' in e else [] for e in
+                               v.get(u'@e', [])] if v else []
 
         # List<List<AnnotationExpr>> arraysAnnotations;
         self._arraysAnnotations = []
@@ -30,7 +32,7 @@ def __init__(self, kwargs={}):
 
         if ad:
             if ad[0]:
-                print 'ReferenceType annotations not implemented'
+                print('ReferenceType annotations not implemented')
                 for a in aa:
                     self._arraysAnnotations.append(locs[u'AnnotationExpr'](a) if a else None)
 
diff --git a/jskparser/ast/type/type.py b/jskparser/ast/type/type.py
index 08e49f1..a373fcc 100644
--- a/jskparser/ast/type/type.py
+++ b/jskparser/ast/type/type.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 from ..node import Node
@@ -12,8 +13,8 @@ def __init__(self, kwargs={}):
     
         # List<AnnotationExpr> annotations;
         annotations = kwargs.get(u'annotations', [])
-        self._annotations = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                annotations.get(u'@e', [])) if annotations else []
+        self._annotations = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                                annotations.get(u'@e', [])] if annotations else []
     
     @property
     def annotations(self): return self._annotations
diff --git a/jskparser/ast/typearguments.py b/jskparser/ast/typearguments.py
index dd008bf..9eb0d80 100644
--- a/jskparser/ast/typearguments.py
+++ b/jskparser/ast/typearguments.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import absolute_import
 from . import _import
 
 class TypeArguments(object):
@@ -8,8 +9,8 @@ def __init__(self, kwargs={}):
         
         # List<Type> typeArguments;
         typeArguments = kwargs.get(u'typeArguments', [])
-        self._typeArguments = map(lambda x: locs[x[u'@t']](x) if u'@t' in x else [],
-                                  typeArguments.get(u'@e', [])) if typeArguments else []
+        self._typeArguments = [locs[x[u'@t']](x) if u'@t' in x else [] for x in
+                                  typeArguments.get(u'@e', [])] if typeArguments else []
 
         # boolean usesDiamondOperator;
         self._usesDiamondOperator = kwargs.get(u'usesDiamondOperator', False)
diff --git a/jskparser/ast/typeparameter.py b/jskparser/ast/typeparameter.py
index 01c371b..c3c1d32 100644
--- a/jskparser/ast/typeparameter.py
+++ b/jskparser/ast/typeparameter.py
@@ -3,7 +3,8 @@
 # The TypeParameter is constructed following the syntax:<br>
 # TypeParameter ::= <IDENTIFIER> ( "extends" }{@link ClassOrInterfaceType}{@code ( "&" }{@link ClassOrInterfaceType}{@code )* )?
 
-from node import Node
+from __future__ import absolute_import
+from .node import Node
 
 from .type.classorinterfacetype import ClassOrInterfaceType
 
@@ -15,13 +16,13 @@ def __init__(self, kwargs={}):
 
         # List<AnnotationExpr> annotations;
         annotations = kwargs.get(u'annotations', [])
-        self._annotations = map(lambda x: AnnotationExpr(x) if u'@t' in x else [],
-                                annotations.get(u'@e', [])) if annotations else []
+        self._annotations = [AnnotationExpr(x) if u'@t' in x else [] for x in
+                                annotations.get(u'@e', [])] if annotations else []
         
         # List<ClassOrInterfaceType> typeBound;
         typeBound = kwargs.get(u'typeBound', [])
-        self._typeBound = map(lambda x: ClassOrInterfaceType(x) if u'@t' in x else [],
-                              typeBound.get(u'@e', [])) if typeBound else []
+        self._typeBound = [ClassOrInterfaceType(x) if u'@t' in x else [] for x in
+                              typeBound.get(u'@e', [])] if typeBound else []
 
         self.add_as_parent(typeBound)
 
diff --git a/jskparser/ast/utils/utils.py b/jskparser/ast/utils/utils.py
index dd7e117..825ccb7 100644
--- a/jskparser/ast/utils/utils.py
+++ b/jskparser/ast/utils/utils.py
@@ -1,6 +1,10 @@
 # This is a bit silly having utils/utils.py but it's the only way I could
 # make this an importable package.
 
+from __future__ import absolute_import
+from __future__ import print_function
+try: unicode
+except: unicode = u"".__class__
 import os
 import logging
 import subprocess
@@ -111,9 +115,9 @@ def extract_nodes(typ, ast, istance=False, recurse=True):
     lst = []
     def f1(n, *args):
         if istance:
-          if any(map(partial(isinstance, n),typ)): lst.append(n)
+          if any([isinstance(n, t) for t in typ]): lst.append(n)
         elif type(n) in typ: lst.append(n)
-    walk(f1, ast) if recurse else map(f1, [ast] + ast.childrenNodes)
+    walk(f1, ast) if recurse else [f1(c) for c in [ast] + ast.childrenNodes]
     return lst
 
 # check whether node is in AST
@@ -178,7 +182,7 @@ def is_subtype(t1, t2):
         raise Exception('Cant dereference {} or {}'.format(t1.name, t2.name))
     if cls1 in cls2.subClasses or cls1 == cls2: return True
     elif cls2.subClasses:
-        return any(map(partial(is_subtype, cls1), cls2.subClasses))
+        return any([is_subtype(cls1, c) for c in cls2.subClasses])
     else: return False
 
 def all_subClasses(n):
@@ -229,7 +233,7 @@ def find_obj(obj):
     else: o = find_obj(n)
 
     if not o:
-        print 'node_to_obj() -- Cant find {}.{}:{}'.format(str(n.name), n.get_coid(),n.beginLine)
+        print('node_to_obj() -- Cant find {}.{}:{}'.format(str(n.name), n.get_coid(),n.beginLine))
         # n might be a static reference to an imported class
         for k, v in n.symtab.get(u'_cu_').symtab.items():
             nm = k.split('.')[-1]
@@ -289,7 +293,7 @@ def find_fld(n, obj_struct):
     if isinstance(scope, Parameter): scope = scope.idd
     
     if not scope:
-        print 'Cant find {}.{}:{}'.format(n.scope.name, n.name, n.beginLine)
+        print('Cant find {}.{}:{}'.format(n.scope.name, n.name, n.beginLine))
         return None
 
     # n's scope might be a class (if static field)
@@ -346,7 +350,7 @@ def anon_nm(a):
     else: return anon_nm(a.parentNode)
 
 def rm_comments(node):
-    node.childrenNodes = filter(lambda n: not isinstance(n, Comment), node.childrenNodes)
+    node.childrenNodes = [n for n in node.childrenNodes if not isinstance(n, Comment)]
 
 def unpack_class_file(nm):
     global JAVA_HOME, RT_JAR
@@ -357,9 +361,9 @@ def unpack_class_file(nm):
         except:
             cmd = ['/usr/libexec/java_home']
             try:
-                JAVA_HOME = subprocess.check_output(cmd).strip(' \n')
-            except subprocess.CalledProcessError as e:
-                logging.error('Unable to extract "{}" from RT_JAR "{}": {}'.format(nm, RT_JAR, e.output))
+                JAVA_HOME = subprocess.check_output(cmd, universal_newlines=True).strip(' \n')
+            except (OSError, subprocess.CalledProcessError) as e:
+                logging.error('Unable to set JAVA_HOME: {} {}'.format(e, getattr(e, 'output', '')))
                 raise Exception('Unable to set JAVA_HOME')
         RT_JAR = os.path.join(JAVA_HOME, 'jre','lib', 'rt.jar')
 
@@ -367,7 +371,7 @@ def unpack_class_file(nm):
     cmd = ['jar', 'xf', RT_JAR, nm]
     logging.debug(' '.join(cmd))
     try:
-        subprocess.check_output(cmd)
+        subprocess.check_output(cmd, universal_newlines=True)
     except subprocess.CalledProcessError as e:
         logging.error('Unable to extract "{}" from RT_JAR "{}": {}'.format(nm, RT_JAR, e.output))
 
@@ -377,7 +381,7 @@ def get_descriptors(nm):
     cmd = ['javap', '-s', nm]
     logging.debug(' '.join(cmd))
     try:
-        cls = subprocess.check_output(cmd)
+        cls = subprocess.check_output(cmd, universal_newlines=True)
     except subprocess.CalledProcessError as e:
         logging.error('Unable to dissassemble "{}": {}'.format(nm, e.output))
 
@@ -386,8 +390,8 @@ def get_descriptors(nm):
     cls = [x.strip() for x in cls.split('\n') if x]
 
     # this is a cool bit of sorcery to pair names with their descriptors
-    cls = zip(*[iter(cls)]*2)
-    flds = filter(lambda d: '(' not in d[0] and 'static {};' not in d[0], cls)
+    cls = list(zip(*[iter(cls)]*2))
+    flds = [d for d in cls if '(' not in d[0] and 'static {};' not in d[0]]
     # print 'flds:', flds
 
     cls_nm_full = nm.replace('/', '.') # [nm.rfind('/')+1:]
@@ -416,7 +420,7 @@ def get_fld_descriptors(path):
     # print 'fld_descriptors', flds
     descriptors = []
     for d in flds:
-        nm = filter(lambda n: n not in ACCESS_MODS, d[0].split(' '))[1].strip(';')
+        nm = [n for n in d[0].split(' ') if n not in ACCESS_MODS][1].strip(';')
         typ = d[1].split(' ')[1].strip('[L;')
         if typ[0] == '[': typ = typ[1:]
         if '/' in typ: typ = typ[typ.rfind('/')+1:]
@@ -456,9 +460,9 @@ def filter_by_params(c):
             ptypes.append(list(typs + [c[-1]]))
             return True
         return False
-    filter(filter_by_params, candidates)
-    # print 'filtered:', filter(filter_by_params, candidates)
-    # print 'ptypes:', ptypes
+    filtered = [filter_by_params(c) for c in candidates]
+    # print('filtered:', filtered)
+    # print('ptypes:', ptypes)
     return ptypes
 
 def mtd_type_from_callexpr(callexpr):
diff --git a/jskparser/ast/visit/generic.py b/jskparser/ast/visit/generic.py
index a109007..683f4d6 100644
--- a/jskparser/ast/visit/generic.py
+++ b/jskparser/ast/visit/generic.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
-import visit as v
+from __future__ import absolute_import
+from . import visit as v
 
 from ..node import Node
 
diff --git a/jskparser/ast/visit/sourcevisitor.py b/jskparser/ast/visit/sourcevisitor.py
index e8f9c8a..b58ce00 100644
--- a/jskparser/ast/visit/sourcevisitor.py
+++ b/jskparser/ast/visit/sourcevisitor.py
@@ -1,7 +1,14 @@
 #!/usr/bin/env python
 
-import cStringIO
-import visit as v
+from __future__ import absolute_import
+from __future__ import print_function
+try:
+    import cStringIO
+except: # so sue me.
+    import io as cStringIO
+try: xrange
+except: xrange = range
+from . import visit as v
 
 from .. import Operators as op
 from .. import AssignOperators as assignop
@@ -99,7 +106,7 @@ def visit(self, node):
 
     @v.when(Node)
     def visit(self, n):
-        print "Unimplemented node:", n
+        print("Unimplemented node:", n)
 
     @v.when(CompilationUnit)
     def visit(self, n):
@@ -144,7 +151,7 @@ def visit(self, n):
 
         # don't print extends Object
         if n.extendsList and \
-           (u'Object' not in map(lambda e: e.name, n.extendsList) and len(n.extendsList) == 1):
+           (u'Object' not in [e.name for e in n.extendsList] and len(n.extendsList) == 1):
             self.printt(' extends ')
             self.printSepList(n.extendsList)
 
@@ -619,7 +626,7 @@ def visit(self, n):
             self.printLn(' {')
             self.indent()
             for m in n.anonymousClassBody:
-                print 'm:', m, m.name, type(m)
+                print('m:', m, m.name, type(m))
             self.printMembers(n.anonymousClassBody)
             self.unindent()
             self.printt('}')
diff --git a/jskparser/ast/visit/symtabgen.py b/jskparser/ast/visit/symtabgen.py
index ca7356d..67cbce7 100644
--- a/jskparser/ast/visit/symtabgen.py
+++ b/jskparser/ast/visit/symtabgen.py
@@ -1,4 +1,7 @@
-import visit as v
+from __future__ import absolute_import
+try: xrange
+except: xrange = range
+from . import visit as v
 
 from .. import JAVA_LANG
 from .. import PRIMITIVES
@@ -57,7 +60,8 @@ def new_symtab(self, n, cp=False):
     def visit(self, node):
         if type(node) in self.NONSYM: return
         self.new_symtab(node)
-        map(lambda n: n.accept(self), node.childrenNodes)
+        for n in node.childrenNodes:
+            n.accept(self)
         # print "Unimplemented node:", node
 
     @v.when(CompilationUnit)
@@ -78,7 +82,7 @@ def visit(self, node):
                 }
             node.imports.append(ImportDeclaration({u'@t':u'ImportDeclaration',u'name':qn, u'implicit': True}))
             for i in node.imports: node.symtab.update({str(i):i})
-        d = dict([v for v in map(lambda t: (t.name,t), node.types)])
+        d = dict([v for v in [(t.name,t) for t in node.types]])
         for ty in node.types:
             ty.symtab.update({u'_cu_':node})
             if self.lib:
@@ -99,11 +103,13 @@ def visit(self, node):
         [node.symtab.update({n.name:n}) for n in node.extendsList if n.name not in node.symtab]
         [node.symtab.update({n.name:n}) for n in node.implementsList if n.name not in node.symtab]
         [node.symtab.update({n.name:n}) for n in node.typeParameters if n.name not in node.symtab]
-        node.members = filter(lambda n: not isinstance(n, EmptyMemberDeclaration), node.members)
-        map(lambda n: node.symtab.update({n.name:n} if isinstance(n, FieldDeclaration) or \
+        node.members = [n for n in node.members if not isinstance(n, EmptyMemberDeclaration)]
+        for n in node.members:
+            node.symtab.update({n.name:n} if isinstance(n, FieldDeclaration) or \
                                          isinstance(n, ClassOrInterfaceDeclaration) else \
-                                         {n.sig():n}), node.members)
-        map(lambda n: n.accept(self), node.members)
+                                         {n.sig():n})
+        for n in node.members:
+            n.accept(self)
         
     @v.when(MethodDeclaration)
     def visit(self, node):
@@ -116,11 +122,16 @@ def visit(self, node):
         if str(node.typee) not in PRIMITIVES and str(node.typee) not in node.symtab:
             node.symtab.update({str(node.typee):node.typee})
         # somethign is weird here. shouldnt have to visit idd and parameters
-        map(lambda p: p.idd.accept(self), node.parameters)
-        map(lambda p: p.accept(self), node.parameters)
-        map(lambda t: node.symtab.update({t.name:t}), node.typeParameters)
-        map(lambda p: p.idd.symtab.update(node.symtab), node.parameters)
-        # map(lambda c: c.accept(self), node.childrenNodes)
+        for p in node.parameters:
+            p.idd.accept(self)
+        for p in node.parameters:
+            p.accept(self)
+        for t in node.typeParameters:
+            node.symtab.update({t.name:t})
+        for p in node.parameters:
+            p.idd.symtab.update(node.symtab)
+        # for c in node.childrenNodes:
+        #     c.accept(self)
         if node.body: node.body.accept(self)
 
         if type(node.parentNode) == ObjectCreationExpr:
@@ -143,7 +154,8 @@ def visit(self, node):
         # for p in node.parameters:
         #     if p.idd: p.idd.accept(self)
         #     if p.method: p.method.accept(self)
-        map(lambda p: p.accept(self), node.parameters)
+        for p in node.parameters:
+            p.accept(self)
         for p in node.parameters:
             if p.idd:
                 p.idd.symtab.update(node.symtab)
@@ -151,7 +163,7 @@ def visit(self, node):
             # Catch args that are actually Axiom Declarations
             if p.method:
                 p.method.symtab.update(node.symtab)
-                node.symtab = dict(p.method.symtab.items() + node.symtab.items())
+                node.symtab = dict(list(p.method.symtab.items()) + list(node.symtab.items()))
         if node.body:
             node.body.accept(self)
         # print node.symtab
@@ -179,9 +191,12 @@ def visit(self, node):
         self.new_symtab(node, cp=True)
         node.parentNode.symtab.update({str(node):node})
         node.symtab.update({str(node):node})
-        map(lambda p: p.idd.accept(self), node.parameters)
-        map(lambda p: p.accept(self), node.parameters)
-        map(lambda p: p.idd.symtab.update(node.symtab), node.parameters)
+        for p in node.parameters:
+            p.idd.accept(self)
+        for p in node.parameters:
+            p.accept(self)
+        for p in node.parameters:
+            p.idd.symtab.update(node.symtab)
         if node.body: node.body.accept(self)
 
     @v.when(FieldDeclaration)
@@ -236,29 +251,35 @@ def visit(self, node):
     @v.when(ExpressionStmt)
     def visit(self, node):
         self.new_symtab(node)
-        map(lambda n: n.accept(self), node.childrenNodes)
+        for n in node.childrenNodes:
+            n.accept(self)
 
     # expr/
     @v.when(FieldAccessExpr)
     def visit(self, node):
         self.new_symtab(node, cp=True)
-        map(lambda n: n.accept(self), node.childrenNodes)
+        for n in node.childrenNodes:
+            n.accept(self)
 
     @v.when(MethodCallExpr)
     def visit(self, node):
         self.new_symtab(node, cp=True)
-        map(lambda n: n.accept(self), node.childrenNodes)
+        for n in node.childrenNodes:
+            n.accept(self)
 
     @v.when(VariableDeclarationExpr)
     def visit(self, node):
         self.new_symtab(node)
-        map(lambda v: v.accept(self), node.childrenNodes)
-        # map(lambda v: v.accept(self), node.varss)
+        for v in node.childrenNodes:
+            v.accept(self)
+        # for v in node.varss:
+        #     v.accept(self)
 
     @v.when(BinaryExpr)
     def visit(self, node):
         self.new_symtab(node)
-        map(lambda n: n.accept(self), node.childrenNodes)
+        for n in node.childrenNodes:
+            n.accept(self)
 
     @v.when(NameExpr)
     def visit(self, node):
diff --git a/jskparser/ast/visit/visit.py b/jskparser/ast/visit/visit.py
index d2ca96f..bad1199 100644
--- a/jskparser/ast/visit/visit.py
+++ b/jskparser/ast/visit/visit.py
@@ -4,6 +4,7 @@
 # visit.py
 # Updated 2013-06-20 to fix bug on line 41
 
+from __future__ import absolute_import
 import inspect
 
 __all__ = ['on', 'when']
@@ -18,7 +19,7 @@ def f(fn):
 def when(param_type):
   def f(fn):
     frame = inspect.currentframe().f_back
-    dispatcher = frame.f_locals[fn.func_name]
+    dispatcher = frame.f_locals[fn.__name__]
     if not isinstance(dispatcher, Dispatcher):
       dispatcher = dispatcher.dispatcher
     dispatcher.add_target(param_type, fn)
@@ -45,7 +46,7 @@ def __call__(self, *args, **kw):
     else:
       issub = issubclass
       t = self.targets
-      ks = t.iterkeys()
+      ks = iter(t.keys())
       return [t[k](*args, **kw) for k in ks if issub(typ, k)]
 
   def add_target(self, typ, target):
diff --git a/jskparser/jskparser/glob2/compat.py b/jskparser/jskparser/glob2/compat.py
index 00a4d6f..b8edda0 100644
--- a/jskparser/jskparser/glob2/compat.py
+++ b/jskparser/jskparser/glob2/compat.py
@@ -1,6 +1,7 @@
 # Back-port functools.lru_cache to Python 2 (and <= 3.2)
 # {{{ http://code.activestate.com/recipes/578078/ (r6)
 
+from __future__ import absolute_import
 from collections import namedtuple
 from functools import update_wrapper
 from threading import RLock
diff --git a/jskparser/jskparser/glob2/fnmatch.py b/jskparser/jskparser/glob2/fnmatch.py
index 47db550..1d1e477 100644
--- a/jskparser/jskparser/glob2/fnmatch.py
+++ b/jskparser/jskparser/glob2/fnmatch.py
@@ -9,6 +9,7 @@
 The function translate(PATTERN) returns a regular expression
 corresponding to PATTERN.  (It does not compile it.)
 """
+from __future__ import absolute_import
 import os
 import posixpath
 import re
@@ -111,4 +112,4 @@ def translate(pat):
                 res = '%s([%s])' % (res, stuff)
         else:
             res = res + re.escape(c)
-    return res + '\Z(?ms)'
+    return '(?ms)' + res + '\Z'
diff --git a/jskparser/jskparser/glob2/impl.py b/jskparser/jskparser/glob2/impl.py
index 0186451..2374384 100644
--- a/jskparser/jskparser/glob2/impl.py
+++ b/jskparser/jskparser/glob2/impl.py
@@ -1,6 +1,8 @@
 """Filename globbing utility."""
 
 from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 
 import sys
 import os
@@ -67,7 +69,7 @@ def iglob(self, pathname, with_matches=False):
         result = self._iglob(pathname)
         if with_matches:
             return result
-        return map(lambda s: s[0], result)
+        return [s[0] for s in result]
 
     def _iglob(self, pathname, rootcall=True):
         """Internal implementation that backs :meth:`iglob`.
@@ -150,7 +152,7 @@ def resolve_pattern(self, dirname, pattern, globstar_with_root):
                 names = [''] if globstar_with_root else []
                 for top, entries in self.walk(dirname):
                     _mkabs = lambda s: os.path.join(top[len(dirname)+1:], s)
-                    names.extend(map(_mkabs, entries))
+                    names.extend([_mkabs(e) for e in entries])
                 # Reset pattern so that fnmatch(), which does not understand
                 # ** specifically, will only return a single group match.
                 pattern = '*'
@@ -163,7 +165,7 @@ def resolve_pattern(self, dirname, pattern, globstar_with_root):
             # Remove hidden files by default, but take care to ensure
             # that the empty string we may have added earlier remains.
             # Do not filter out the '' that we might have added earlier
-            names = filter(lambda x: not x or not _ishidden(x), names)
+            names = [x for x in names if not x or not _ishidden(x)]
         return fnmatch.filter(names, pattern)
 
 
diff --git a/jskparser/jskparser/jskparser.py b/jskparser/jskparser/jskparser.py
index b92c98e..2bdd560 100644
--- a/jskparser/jskparser/jskparser.py
+++ b/jskparser/jskparser/jskparser.py
@@ -1,6 +1,8 @@
 #! /usr/bin/env python
 
-import util
+from __future__ import absolute_import
+from __future__ import print_function
+from . import util
 import json
 import logging
 import logging.config
@@ -103,10 +105,10 @@ def create_logger(log_lvl):
         if OPT.symtab:
             def f(n):
                 if type(n) not in SymtabGen.NONSYM:
-                    print type(n).__name__, n.name, map(lambda nn: (nn[0], nn[1]), n.symtab.items())
+                    print(type(n).__name__, n.name, [(nn[0], nn[1]) for nn in n.symtab.items()])
             g = GenericVisitor(f)
             g.visit(program)
         else:
             p = SourcePrinter()
-            print p.visit(program)
+            print(p.visit(program))
     exit(0)
diff --git a/jskparser/jskparser/logger.py b/jskparser/jskparser/logger.py
index 862cab1..d8b893d 100644
--- a/jskparser/jskparser/logger.py
+++ b/jskparser/jskparser/logger.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import re
 import sys
@@ -6,7 +7,7 @@
 from lib.enum import enum
 from lib.rlock import FLockFileHandler
 
-import util
+from . import util
 
 C.log_caller = enum(JAVASK="jsk", PSKETCH="psketch")
 
diff --git a/jskparser/jskparser/util.py b/jskparser/jskparser/util.py
index 955f542..d8bd725 100644
--- a/jskparser/jskparser/util.py
+++ b/jskparser/jskparser/util.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 from subprocess import call
 
diff --git a/lib/const.py b/lib/const.py
index 46d9822..a188669 100644
--- a/lib/const.py
+++ b/lib/const.py
@@ -1,10 +1,11 @@
 # http://code.activestate.com/recipes/65207
 
+from __future__ import absolute_import
 class _const:
   class ConstError(TypeError): pass
   def __setattr__(self, name, v):
-    if self.__dict__.has_key(name):
-      raise self.ConstError, "Can't rebind const(%s)" % name
+    if name in self.__dict__:
+      raise self.ConstError("Can't rebind const(%s)" % name)
     self.__dict__[name] = v
 
 import sys
diff --git a/lib/glob2/compat.py b/lib/glob2/compat.py
index 00a4d6f..b8edda0 100644
--- a/lib/glob2/compat.py
+++ b/lib/glob2/compat.py
@@ -1,6 +1,7 @@
 # Back-port functools.lru_cache to Python 2 (and <= 3.2)
 # {{{ http://code.activestate.com/recipes/578078/ (r6)
 
+from __future__ import absolute_import
 from collections import namedtuple
 from functools import update_wrapper
 from threading import RLock
diff --git a/lib/glob2/fnmatch.py b/lib/glob2/fnmatch.py
index 47db550..1d1e477 100644
--- a/lib/glob2/fnmatch.py
+++ b/lib/glob2/fnmatch.py
@@ -9,6 +9,7 @@
 The function translate(PATTERN) returns a regular expression
 corresponding to PATTERN.  (It does not compile it.)
 """
+from __future__ import absolute_import
 import os
 import posixpath
 import re
@@ -111,4 +112,4 @@ def translate(pat):
                 res = '%s([%s])' % (res, stuff)
         else:
             res = res + re.escape(c)
-    return res + '\Z(?ms)'
+    return '(?ms)' + res + '\Z'
diff --git a/lib/glob2/impl.py b/lib/glob2/impl.py
index 0186451..2374384 100644
--- a/lib/glob2/impl.py
+++ b/lib/glob2/impl.py
@@ -1,6 +1,8 @@
 """Filename globbing utility."""
 
 from __future__ import absolute_import
+try: unicode
+except: unicode = u"".__class__
 
 import sys
 import os
@@ -67,7 +69,7 @@ def iglob(self, pathname, with_matches=False):
         result = self._iglob(pathname)
         if with_matches:
             return result
-        return map(lambda s: s[0], result)
+        return [s[0] for s in result]
 
     def _iglob(self, pathname, rootcall=True):
         """Internal implementation that backs :meth:`iglob`.
@@ -150,7 +152,7 @@ def resolve_pattern(self, dirname, pattern, globstar_with_root):
                 names = [''] if globstar_with_root else []
                 for top, entries in self.walk(dirname):
                     _mkabs = lambda s: os.path.join(top[len(dirname)+1:], s)
-                    names.extend(map(_mkabs, entries))
+                    names.extend([_mkabs(e) for e in entries])
                 # Reset pattern so that fnmatch(), which does not understand
                 # ** specifically, will only return a single group match.
                 pattern = '*'
@@ -163,7 +165,7 @@ def resolve_pattern(self, dirname, pattern, globstar_with_root):
             # Remove hidden files by default, but take care to ensure
             # that the empty string we may have added earlier remains.
             # Do not filter out the '' that we might have added earlier
-            names = filter(lambda x: not x or not _ishidden(x), names)
+            names = [x for x in names if not x or not _ishidden(x)]
         return fnmatch.filter(names, pattern)
 
 
diff --git a/lib/rlock.py b/lib/rlock.py
index d76cebc..99e3f68 100644
--- a/lib/rlock.py
+++ b/lib/rlock.py
@@ -21,6 +21,7 @@
 Tested under Debian GNU/Linux, with Python 2.4, 2.5, 2.6 and 3.1.
 """
 
+from __future__ import absolute_import
 import logging
 import os
 import sys
diff --git a/lib/visit.py b/lib/visit.py
index d2ca96f..890df4f 100644
--- a/lib/visit.py
+++ b/lib/visit.py
@@ -4,6 +4,7 @@
 # visit.py
 # Updated 2013-06-20 to fix bug on line 41
 
+from __future__ import absolute_import
 import inspect
 
 __all__ = ['on', 'when']
@@ -18,7 +19,7 @@ def f(fn):
 def when(param_type):
   def f(fn):
     frame = inspect.currentframe().f_back
-    dispatcher = frame.f_locals[fn.func_name]
+    dispatcher = frame.f_locals[fn.__name__]
     if not isinstance(dispatcher, Dispatcher):
       dispatcher = dispatcher.dispatcher
     dispatcher.add_target(param_type, fn)
diff --git a/test/__init__.py b/test/__init__.py
index bbfb500..3614088 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import subprocess
 import unittest
diff --git a/test/axioms/ArrayList/run.py b/test/axioms/ArrayList/run.py
index 187a2e2..c36d5fd 100644
--- a/test/axioms/ArrayList/run.py
+++ b/test/axioms/ArrayList/run.py
@@ -1,3 +1,7 @@
+from __future__ import absolute_import
+from __future__ import print_function
+try: xrange
+except: xrange = range
 import subprocess
 import re
 import time
@@ -13,7 +17,7 @@ def main(num_trials, test, first_test, last_test):
     log = open(log_file, 'w')
     if last_test == 0: last_test = int(re.findall(r't[0-9]+', text)[-1][1:])
     for i in xrange(first_test + 1 if first_test == -1 else first_test, last_test+1):
-        print 'Running test {}'.format(i)
+        print('Running test {}'.format(i))
         times = []
         for j in xrange(num_trials):
             cmd = ['sketch', '--fe-def', 'TID={}'.format(i), '--fe-inc', input_dir, '{}/main.sk'.format(input_dir)]
@@ -25,11 +29,11 @@ def main(num_trials, test, first_test, last_test):
                 times.append(float(t[start:t.find('\n', start)]))
                 time.sleep(1)
             except:
-                print 'ERROR: {}'.format(' '.join(cmd))
+                print('ERROR: {}'.format(' '.join(cmd)))
                 with open(error_file, 'a') as f: f.write('{}\n'.format(' '.join(cmd)))
                 times.extend([0.0]*num_trials)
                 break
-        if first_test != -1: print 'Test: {}, times: {}'.format(i, times)
+        if first_test != -1: print('Test: {}, times: {}'.format(i, times))
         with open(result_file, 'a') as f:
             [f.write('{:.2f}\t'.format(n)) for n in times]
             f.write('\n')
@@ -63,29 +67,29 @@ def sort_results(test):
     jskparser.add_option('-l', action='store', type='int', dest='last_test', default=0,
                       help='Last test to run.')
     (options, args) = jskparser.parse_args()
-    print 'Number of trials: {}'.format(options.trials)
+    print('Number of trials: {}'.format(options.trials))
     if options.impl:
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test)
-        print
+        print()
     if options.adt_n:
-        print 'Testing non-deterministic adt'
+        print('Testing non-deterministic adt')
         main(options.trials, 'adt_n', options.first_test, options.last_test)
-        print
+        print()
     if options.adt_d:
-        print 'Testing deterministic adt'
+        print('Testing deterministic adt')
         main(options.trials, 'adt_d', options.first_test, options.last_test)
-        print
+        print()
     if options.obj:
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test)
-        print
+        print()
     if (not options.impl) and (not options.adt_n) and (not options.adt_d) and (not options.obj):
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test)
-        print 'Testing non-deterministic adt'
+        print('Testing non-deterministic adt')
         main(options.trials, 'adt_n', options.first_test, options.last_test)
-        print 'Testing deterministic adt'
+        print('Testing deterministic adt')
         main(options.trials, 'adt_d', options.first_test, options.last_test)
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test)
diff --git a/test/axioms/HashMap/run.py b/test/axioms/HashMap/run.py
index 187a2e2..c36d5fd 100644
--- a/test/axioms/HashMap/run.py
+++ b/test/axioms/HashMap/run.py
@@ -1,3 +1,7 @@
+from __future__ import absolute_import
+from __future__ import print_function
+try: xrange
+except: xrange = range
 import subprocess
 import re
 import time
@@ -13,7 +17,7 @@ def main(num_trials, test, first_test, last_test):
     log = open(log_file, 'w')
     if last_test == 0: last_test = int(re.findall(r't[0-9]+', text)[-1][1:])
     for i in xrange(first_test + 1 if first_test == -1 else first_test, last_test+1):
-        print 'Running test {}'.format(i)
+        print('Running test {}'.format(i))
         times = []
         for j in xrange(num_trials):
             cmd = ['sketch', '--fe-def', 'TID={}'.format(i), '--fe-inc', input_dir, '{}/main.sk'.format(input_dir)]
@@ -25,11 +29,11 @@ def main(num_trials, test, first_test, last_test):
                 times.append(float(t[start:t.find('\n', start)]))
                 time.sleep(1)
             except:
-                print 'ERROR: {}'.format(' '.join(cmd))
+                print('ERROR: {}'.format(' '.join(cmd)))
                 with open(error_file, 'a') as f: f.write('{}\n'.format(' '.join(cmd)))
                 times.extend([0.0]*num_trials)
                 break
-        if first_test != -1: print 'Test: {}, times: {}'.format(i, times)
+        if first_test != -1: print('Test: {}, times: {}'.format(i, times))
         with open(result_file, 'a') as f:
             [f.write('{:.2f}\t'.format(n)) for n in times]
             f.write('\n')
@@ -63,29 +67,29 @@ def sort_results(test):
     jskparser.add_option('-l', action='store', type='int', dest='last_test', default=0,
                       help='Last test to run.')
     (options, args) = jskparser.parse_args()
-    print 'Number of trials: {}'.format(options.trials)
+    print('Number of trials: {}'.format(options.trials))
     if options.impl:
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test)
-        print
+        print()
     if options.adt_n:
-        print 'Testing non-deterministic adt'
+        print('Testing non-deterministic adt')
         main(options.trials, 'adt_n', options.first_test, options.last_test)
-        print
+        print()
     if options.adt_d:
-        print 'Testing deterministic adt'
+        print('Testing deterministic adt')
         main(options.trials, 'adt_d', options.first_test, options.last_test)
-        print
+        print()
     if options.obj:
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test)
-        print
+        print()
     if (not options.impl) and (not options.adt_n) and (not options.adt_d) and (not options.obj):
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test)
-        print 'Testing non-deterministic adt'
+        print('Testing non-deterministic adt')
         main(options.trials, 'adt_n', options.first_test, options.last_test)
-        print 'Testing deterministic adt'
+        print('Testing deterministic adt')
         main(options.trials, 'adt_d', options.first_test, options.last_test)
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test)
diff --git a/test/axioms/Stack/run.py b/test/axioms/Stack/run.py
index 3aa064a..40a6a57 100644
--- a/test/axioms/Stack/run.py
+++ b/test/axioms/Stack/run.py
@@ -1,3 +1,7 @@
+from __future__ import absolute_import
+from __future__ import print_function
+try: xrange
+except: xrange = range
 import subprocess
 import re
 
@@ -12,7 +16,7 @@ def main(num_trials, test, first_test, last_test):
     log = open(log_file, 'w')
     if last_test == 0: last_test = int(re.findall(r't[0-9]+', text)[-1][1:])
     for i in xrange(first_test + 1 if first_test == -1 else first_test, last_test+1):
-        print 'Running test {}'.format(i)
+        print('Running test {}'.format(i))
         times = []
         for j in range(num_trials):
             cmd = ['sketch', '--fe-def', 'TID={}'.format(i), '--fe-inc', input_dir, '{}/main.sk'.format(input_dir)]
@@ -23,11 +27,11 @@ def main(num_trials, test, first_test, last_test):
                 start = t.rfind('Total time = ') + len('Total time = ')
                 times.append(float(t[start:t.find('\n', start)]))
             except:
-                print 'ERROR: {}'.format(' '.join(cmd))
+                print('ERROR: {}'.format(' '.join(cmd)))
                 with open(error_file, 'a') as f: f.write('{}\n'.format(' '.join(cmd)))
                 times.extend([0.0]*num_trials)
                 break
-        if first_test != -1: print 'Test: {}, times: {}'.format(i, times)
+        if first_test != -1: print('Test: {}, times: {}'.format(i, times))
         with open(result_file, 'a') as f:
             [f.write('{:.2f}\t'.format(n)) for n in times]
             f.write('\n')
@@ -59,23 +63,23 @@ def sort_results(test):
     jskparser.add_option('-l', action='store', type='int', dest='last_test', default=0,
                       help='Last test to run.')
     (options, args) = jskparser.parse_args()
-    print 'Number of trials: {}'.format(options.trials)
+    print('Number of trials: {}'.format(options.trials))
     if options.impl:
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test)
-        print
+        print()
     if options.adt:
-        print 'Testing adt'
+        print('Testing adt')
         main(options.trials, 'adt', options.first_test, options.last_test)
-        print
+        print()
     if options.obj:
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test)
-        print
+        print()
     if (not options.impl) and (not options.adt) and (not options.obj):
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test)
-        print 'Testing adt'
+        print('Testing adt')
         main(options.trials, 'adt', options.first_test, options.last_test)
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test)
diff --git a/test/axioms/String/format.py b/test/axioms/String/format.py
index 4b57ca4..31a46c0 100644
--- a/test/axioms/String/format.py
+++ b/test/axioms/String/format.py
@@ -1,15 +1,17 @@
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 import re
 
 FILE_NAME=sys.argv[1]
-print FILE_NAME
+print(FILE_NAME)
 FILE_RENAME=FILE_NAME[:FILE_NAME.rfind('.')]+'.csv'
-print FILE_RENAME
+print(FILE_RENAME)
 
 with open(FILE_NAME, 'r') as f: text = f.read()
 text = re.sub(r'\n', '', text)
 text = re.sub(r'Number of trials: 15Testing .+?Running test 8Test: 8, times: \[', '', text)
 text = re.sub('\]', '\n', text)
 text = re.sub(', ', '\t', text)
-print text
+print(text)
 with open(FILE_RENAME, 'w') as f: f.write(text)
diff --git a/test/axioms/String/run.py b/test/axioms/String/run.py
index c1930a5..c7b919d 100644
--- a/test/axioms/String/run.py
+++ b/test/axioms/String/run.py
@@ -1,3 +1,7 @@
+from __future__ import absolute_import
+from __future__ import print_function
+try: xrange
+except: xrange = range
 import subprocess
 import re
 import time
@@ -13,7 +17,7 @@ def main(num_trials, test, first_test, last_test, I):
     log = open(log_file, 'w')
     if last_test == -1: last_test = int(re.findall(r't[0-9]+', text)[-1][1:])
     for i in xrange(first_test + 1 if first_test == -1 else first_test, last_test+1):
-        print 'Running test {}'.format(i)
+        print('Running test {}'.format(i))
         times = []
         for j in range(num_trials):
             cmd = ['sketch', '--fe-def', 'TID={}'.format(i), '--fe-def', 'I={}'.format(I), '--fe-inc', input_dir, '{}/main.sk'.format(input_dir)]
@@ -25,11 +29,11 @@ def main(num_trials, test, first_test, last_test, I):
                 times.append(float(t[start:t.find('\n', start)]))
                 time.sleep(1)
             except:
-                print 'ERROR: {}'.format(' '.join(cmd))
+                print('ERROR: {}'.format(' '.join(cmd)))
                 with open(error_file, 'a') as f: f.write('{}\n'.format(' '.join(cmd)))
                 times.extend([0.0]*num_trials)
                 break
-        if first_test != -1: print 'Test: {}, times: {}'.format(i, times)
+        if first_test != -1: print('Test: {}, times: {}'.format(i, times))
         with open(result_file, 'a') as f:
             [f.write('{:.2f}\t'.format(n)) for n in times]
             f.write('\n')
@@ -67,36 +71,36 @@ def sort_results(test):
     jskparser.add_option('-I', action='store', type='int', dest='I', default=0,
                       help='Loop amount for various tests.')
     (options, args) = jskparser.parse_args()
-    print 'Number of trials: {}'.format(options.trials)
+    print('Number of trials: {}'.format(options.trials))
     if options.impl:
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test, options.I)
-        print
+        print()
     if options.adt_n:
-        print 'Testing non-deterministic adt'
+        print('Testing non-deterministic adt')
         main(options.trials, 'adt_n', options.first_test, options.last_test, options.I)
-        print
+        print()
     if options.adt_d:
-        print 'Testing deterministic adt'
+        print('Testing deterministic adt')
         main(options.trials, 'adt_d', options.first_test, options.last_test, options.I)
-        print
+        print()
     if options.adt_a:
-        print 'Testing arithmetize adt'
+        print('Testing arithmetize adt')
         main(options.trials, 'adt_a', options.first_test, options.last_test, options.I)
-        print
+        print()
     if options.obj:
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test, options.I)
-        print
+        print()
     if (not options.impl) and (not options.adt_n) and (not options.adt_d) and \
        (not options.adt_a) and (not options.obj):
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl', options.first_test, options.last_test, options.I)
-        print 'Testing non-deterministic adt'
+        print('Testing non-deterministic adt')
         main(options.trials, 'adt_n', options.first_test, options.last_test, options.I)
-        print 'Testing deterministic adt'
+        print('Testing deterministic adt')
         main(options.trials, 'adt_d', options.first_test, options.last_test, options.I)
-        print 'Testing arithmetize adt'
+        print('Testing arithmetize adt')
         main(options.trials, 'adt_a', options.first_test, options.last_test, options.I)
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object', options.first_test, options.last_test, options.I)
diff --git a/test/axioms/benchmarks/HashMap2/HashTable.java b/test/axioms/benchmarks/HashMap2/HashTable.java
index 259e247..5f07649 100644
--- a/test/axioms/benchmarks/HashMap2/HashTable.java
+++ b/test/axioms/benchmarks/HashMap2/HashTable.java
@@ -1,7 +1,7 @@
 package Interfaing;
 
 public interface HashTable<K, V> {
-	// put key�value pair into the table
+	// put key­value pair into the table
 	public void put(K key, V value);
 
 	// get value paired with key, return null if
diff --git a/test/axioms/run.py b/test/axioms/run.py
index b7934f4..73c68a3 100644
--- a/test/axioms/run.py
+++ b/test/axioms/run.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from __future__ import print_function
 import subprocess
 import re
 import math
@@ -14,7 +16,7 @@ def main(num_trials, test):
     log = open(log_file, 'w')
     num_tests=int(re.findall(r't[0-9]+', text)[-1][1:]) + 1
     for i in range(num_tests):
-        print 'Running test {}'.format(i)
+        print('Running test {}'.format(i))
         times = []
         for j in range(num_trials):
             cmd = ['sketch', '--fe-def', 'TID={}'.format(i), '--fe-inc', input_dir, '{}/main.sk'.format(input_dir)]
@@ -26,7 +28,7 @@ def main(num_trials, test):
                 times.append(float(t[start:t.find('\n', start)]))
                 time.sleep(1)
             except:
-                print 'ERROR: {}'.format(' '.join(cmd))
+                print('ERROR: {}'.format(' '.join(cmd)))
                 with open(error_file, 'a') as f: f.write('{}\n'.format(' '.join(cmd)))
                 times.extend([0.0]*num_trials)
                 break
@@ -43,11 +45,11 @@ def median(nums):
         else: return nums[int(math.floor(mid))]
     
     with open('results/impl.csv','r') as impl_fd:
-        impl_txt = map(lambda v: v.strip('\n\t'), impl_fd.readlines())
+        impl_txt = [v.strip('\n\t') for v in impl_fd.readlines()]
     with open('results/adt.csv','r') as adt_fd:
-        adt_txt = map(lambda v: v.strip('\n\t'), adt_fd.readlines())
+        adt_txt = [v.strip('\n\t') for v in adt_fd.readlines()]
     with open('results/Object.csv','r') as obj_fd:
-        Object_txt = map(lambda v: v.strip('\n\t'), obj_fd.readlines())
+        Object_txt = [v.strip('\n\t') for v in obj_fd.readlines()]
     
     impl_fd = open('results/impl_s.csv','w')
     adt_fd = open('results/adt_s.csv','w')
@@ -58,9 +60,9 @@ def median(nums):
         strs_a = a.split('\t') if a.split('\t') != [''] else [0]
         strs_o = o.split('\t') if o.split('\t') != [''] else [0]
 
-        mi = median(map(float, strs_i))
-        ma = median(map(float, strs_a))
-        mo = median(map(float, strs_o))
+        mi = median([float(s) for s in strs_i])
+        ma = median([float(s) for s in strs_a])
+        mo = median([float(s) for s in strs_o])
         vals.append((mi, ma, mo))
 
         # rewrite these in sorted order b/c Numbers on OS X is a POS
@@ -69,7 +71,8 @@ def median(nums):
         obj_fd.write('{}\n'.format('\t'.join(map(str,(sorted(map(float, strs_o)))))))
 
     with open('results/all.csv', 'w') as f:
-        map(lambda v: f.write('{}\t{}\t{}\n'.format(v[0], v[1], v[2])), vals)
+        for v in vals:
+            f.write('{}\t{}\t{}\n'.format(v[0], v[1], v[2]))
 
 if __name__ == '__main__':
     from optparse import OptionParser
@@ -83,23 +86,23 @@ def median(nums):
     jskparser.add_option('-n', action='store', type='int', dest='trials', default=1,
                       help='Number of trials to run.')
     (options, args) = jskparser.parse_args()
-    print 'Number of trials: {}'.format(options.trials)
+    print('Number of trials: {}'.format(options.trials))
     if options.impl:
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl')
-        print
+        print()
     if options.adt:
-        print 'Testing adt'
+        print('Testing adt')
         main(options.trials, 'adt')
-        print
+        print()
     if options.obj:
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object')
-        print
+        print()
     if (not options.impl) and (not options.adt) and (not options.obj):
-        print 'Testing implementation'
+        print('Testing implementation')
         main(options.trials, 'impl')
-        print 'Testing adt'
+        print('Testing adt')
         main(options.trials, 'adt')
-        print 'Testing Object'
+        print('Testing Object')
         main(options.trials, 'Object')
diff --git a/test/test_axiom_gen.py b/test/test_axiom_gen.py
index 10a3bd0..eb0225d 100644
--- a/test/test_axiom_gen.py
+++ b/test/test_axiom_gen.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import unittest
 
@@ -10,7 +11,7 @@
 
 class TestJava(TestCommon):
     def __test(self, fs, inline, unroll, adp_conc=False, arr=32):
-        _fs = map(lambda f: os.path.join(tests, f), fs)
+        _fs = [os.path.join(tests, f) for f in fs]
         if adp_conc:
             ret = java_sk.main.translate(prg=_fs, log_lvl='30', lib=False, opts=["--bnd-inline-amnt", str(inline), "--bnd-unroll-amnt", str(unroll), "--bnd-arr-size", str(arr), "--slv-timeout",  "10", "--slv-randassign", "--slv-simple-inputs"])
         else:
@@ -160,7 +161,7 @@ def __test(self, fs, inline, unroll, adp_conc=False, arr=32):
 
     def test_EasyCSVRewrite(self):
         files = ["CsvDocument.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "rewrite/", "shared/"]
-        files = map(lambda s: "EasyCSV/" + s, files)
+        files = ["EasyCSV/" + s for s in files]
         inline = 3
         unroll = 5
         # self.__test(files, inline, unroll, True)
diff --git a/test/test_axioms.py b/test/test_axioms.py
index 0db4cee..63bad2e 100644
--- a/test/test_axioms.py
+++ b/test/test_axioms.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import unittest
 
@@ -10,7 +11,7 @@
 
 class TestJava(TestCommon):
     def __test(self, fs, inline, unroll, adp_conc=False, arr=32):
-        _fs = map(lambda f: os.path.join(tests, f), fs)
+        _fs = [os.path.join(tests, f) for f in fs]
         if adp_conc:
             ret = java_sk.main.translate(prg=_fs, log_lvl='30', lib=False, opts=["--bnd-inline-amnt", str(inline), "--bnd-unroll-amnt", str(unroll), "--bnd-arr-size", str(arr), "--slv-timeout",  "10", "--slv-randassign", "--slv-simple-inputs"])
         else:
@@ -23,7 +24,7 @@ def __test(self, fs, inline, unroll, adp_conc=False, arr=32):
 
     def test_SuffixArrayRewrite(self):
         files = ["SuffixArray_loops2.java", "SuffixArrayTest.java", "rewrite/"]        
-        files = map(lambda s: "SuffixArray_bigger/" + s, files)
+        files = ["SuffixArray_bigger/" + s for s in files]
         inline = 3
         unroll = 8
         self.__test(files, inline, unroll)        
@@ -31,7 +32,7 @@ def test_SuffixArrayRewrite(self):
     # def test_KafkaRewrite(self):
     #     # files = ["JCECipher_syn_rewrite.java", "OpenSSLCipher_syn_rewrite.java", "CipherFactory.java", "ICipher_rewrite.java", "Tester_rewrite.java", "rewrite/", "shared/"]
     #     files = ["JCECipher_syn.java", "OpenSSLCipher_syn.java", "CipherFactory.java", "ICipher_model.java", "Tester_model.java", "model/", "shared/"]
-    #     files = map(lambda s: "Kafka_biggest/" + s, files)
+    #     files = ["Kafka_biggest/" + s for s in files]
     #     inline = 2
     #     unroll = 35
     #     # inline = 1
@@ -40,15 +41,15 @@ def test_SuffixArrayRewrite(self):
 
     # def test_SimpleArrayListZ3(self):
     #     files = ["SimpleExample.java", "ArrayList.java", "Object.java"]
-    #     files = map(lambda s: "SimpleArrayListExampleZ3/" + s, files)
+    #     files = ["SimpleArrayListExampleZ3/" + s for s in files]
     #     inline = 2
     #     unroll = 8
     #     self.__test(files, inline, unroll)
-        
+
     # def test_RomList_bigger(self):
     #     files = ["RomlistParser_syn_model.java", "RomlistGame.java", "Tester.java", "model/", "shared/"]
     #     # files = ["RomlistParser_rewrite.java", "RomlistGame.java", "Tester.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "RomList_bigger/" + s, files)
+    #     files = ["RomList_bigger/" + s for s in files]
     #     inline = 2
     #     unroll = 26
     #     # unroll = 19
@@ -57,7 +58,7 @@ def test_SuffixArrayRewrite(self):
 
     # def test_ComparatorRewrite(self):
     #     files = ["CommunicationWithFiles_syn_rewrite.java", "Comparator_rewrite.java", "Tester.java", "rewrite/", "shared/"] 
-    #     files = map(lambda s: "Comparator_bigger/" + s, files)
+    #     files = ["Comparator_bigger/" + s for s in files]
     #     inline = 2
     #     unroll = 10
     #     self.__test(files, inline, unroll, True)            
@@ -65,14 +66,14 @@ def test_SuffixArrayRewrite(self):
     # def test_PasswordManager_bigger(self):
     #     files = ["Cryptographer_syn_model.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "model/", "shared/"]
     #     # files = ["Cryptographer_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "PasswordManager_bigger/" + s, files)
+    #     files = ["PasswordManager_bigger/" + s for s in files]
     #     inline = 2
     #     unroll = 16
     #     self.__test(files, inline, unroll)
-        
+
     # def test_EasyCSVRewrite_bigger(self):
     #     files = ["CsvDocument_syn.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "EasyCSV_bigger/" + s, files)
+    #     files = ["EasyCSV_bigger/" + s for s in files]
     #     inline = 3
     #     unroll = 5
     #     # self.__test(files, inline, unroll, True)
@@ -80,77 +81,77 @@ def test_SuffixArrayRewrite(self):
 
     # def test_CipherFactoryModel_bigger(self):
     #     files = ["CryptoManager_syn_model.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_model.java", "ICipherFactory.java", "ICryptoManager.java", "model/", "shared/"]
-    #     files = map(lambda s: "CipherFactory_bigger/" + s, files)
+    #     files = ["CipherFactory_bigger/" + s for s in files]
     #     inline = 2
     #     unroll = 9
     #     self.__test(files, inline, unroll)
 
     # def test_SuffixArrayModel_bigger(self):
     #     files = ["SuffixArray_loops.java", "SuffixArrayTest.java", "model/"]        
-    #     files = map(lambda s: "SuffixArray_bigger/" + s, files)
+    #     files = ["SuffixArray_bigger/" + s for s in files]
     #     inline = 3
     #     unroll = 8
     #     self.__test(files, inline, unroll)
 
     # def test_SuffixArrayModel(self):
     #     files = ["SuffixArray_loops.java", "SuffixArrayTest.java", "model/"]        
-    #     files = map(lambda s: "SuffixArray/" + s, files)
+    #     files = ["SuffixArray/" + s for s in files]
     #     inline = 2
     #     unroll = 8
     #     self.__test(files, inline, unroll)
 
     # def test_HashMap1Model(self):
     #     files = ["HashTable_loops.java", "HashTableNode.java", "HashTableTest.java", "model/", "shared/"]
-    #     files = map(lambda s: "HashMap1/" + s, files)
+    #     files = ["HashMap1/" + s for s in files]
     #     inline = 2
     #     unroll = 13
     #     self.__test(files, inline, unroll)
-        
+
     # def test_HashMap2Model(self):
     #     files = ["Bucketing_syn.java", "BucketingTest.java", "HashTable.java", "Pair.java", "model/", "shared/"]
-    #     files = map(lambda s: "HashMap2/" + s, files)
+    #     files = ["HashMap2/" + s for s in files]
     #     inline = 1
     #     unroll = 11
     #     self.__test(files, inline, unroll)
-        
+
     # def test_PasswordManagerModel(self):
     #     files = ["Cryptographer_syn_model.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "model/", "shared/"]
-    #     files = map(lambda s: "PasswordManager/" + s, files)
+    #     files = ["PasswordManager/" + s for s in files]
     #     inline = 2
     #     unroll = 16
     #     self.__test(files, inline, unroll)
-        
+
     # def test_CipherFactoryModel(self):
     #     files = ["CryptoManager_syn_model.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_model.java", "ICipherFactory.java", "ICryptoManager.java", "model/", "shared/"]
-    #     files = map(lambda s: "CipherFactory/" + s, files)
+    #     files = ["CipherFactory/" + s for s in files]
     #     inline = 2
     #     unroll = 9
     #     self.__test(files, inline, unroll)
-        
+
     # def test_KafkaModel(self):
     #     files = ["JCECipher_syn.java", "OpenSSLCipher_syn.java", "CipherFactory.java", "ICipher_model.java", "Tester.java", "model/", "shared/"]
-    #     files = map(lambda s: "Kafka/" + s, files)
+    #     files = ["Kafka/" + s for s in files]
     #     inline = 2
     #     unroll = 35
     #     self.__test(files, inline, unroll)
 
     # def test_EasyCSVModel(self):
     #     files = ["CsvDocument_syn.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "model/", "shared/"]
-    #     files = map(lambda s: "EasyCSV/" + s, files)
+    #     files = ["EasyCSV/" + s for s in files]
     #     inline = 3
     #     unroll = 5
     #     self.__test(files, inline, unroll)
 
     # def test_RomListModel(self):
     #     files = ["RomlistParser_syn_model.java", "RomlistGame.java", "Tester.java", "model/", "shared/"]
-    #     files = map(lambda s: "RomList/" + s, files)
+    #     files = ["RomList/" + s for s in files]
     #     inline = 2
     #     unroll = 26
     #     self.__test(files, inline, unroll, True)
 
     # def test_ComparatorModel(self):
     #     files = ["CommunicationWithFiles_syn_model.java", "Comparator_model.java", "Tester.java", "model/", "shared/"]
-    #     files = map(lambda s: "Comparator/" + s, files)
+    #     files = ["Comparator/" + s for s in files]
     #     inline = 2
     #     unroll = 10
     #     self.__test(files, inline, unroll, True, 50)
@@ -158,24 +159,24 @@ def test_SuffixArrayRewrite(self):
 #################################################################
 ## REWRITE TESTS
 #################################################################
-    
+
     # def test_SuffixArrayRewrite(self):
     #     files = ["SuffixArray_loops.java", "SuffixArrayTest.java", "rewrite/"]        
-    #     files = map(lambda s: "SuffixArray/" + s, files)
+    #     files = ["SuffixArray/" + s for s in files]
     #     inline = 3
     #     unroll = 8
     #     self.__test(files, inline, unroll)        
 
     # def test_HashMap1Rewrite(self):
     #     files = ["HashTable_loops.java", "HashTableNode.java", "HashTableTest.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "HashMap1/" + s, files)
+    #     files = ["HashMap1/" + s for s in files]
     #     inline = 3
     #     unroll = 3
     #     self.__test(files, inline, unroll)
 
     # def test_HashMap2Rewrite(self):
     #     files = ["Bucketing_syn.java", "BucketingTest.java", "HashTable.java", "Pair.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "HashMap2/" + s, files)
+    #     files = ["HashMap2/" + s for s in files]
     #     inline = 1
     #     unroll = 2
     #     self.__test(files, inline, unroll)
@@ -183,22 +184,22 @@ def test_SuffixArrayRewrite(self):
     # def test_PasswordManagerRewrite(self):
     #     files = ["Cryptographer_syn_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
     #     # files = ["Cryptographer_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "PasswordManager/" + s, files)
+    #     files = ["PasswordManager/" + s for s in files]
     #     inline = 2
     #     unroll = 16
     #     self.__test(files, inline, unroll)
-        
+
     # def test_PasswordManagerRewrite_nobox(self):
     #     files = ["Cryptographer_syn_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
     #     # files = ["Cryptographer_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "PasswordManager_nobox/" + s, files)
+    #     files = ["PasswordManager_nobox/" + s for s in files]
     #     inline = 2
     #     unroll = 16
     #     self.__test(files, inline, unroll)
-        
+
     # def test_CipherFactoryRewrite(self):
     #     files = ["CryptoManager_syn_rewrite.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_rewrite.java", "ICipherFactory.java", "ICryptoManager.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "CipherFactory/" + s, files)
+    #     files = ["CipherFactory/" + s for s in files]
     #     inline = 2
     #     unroll = 9
     #     self.__test(files, inline, unroll)
@@ -206,7 +207,7 @@ def test_SuffixArrayRewrite(self):
     # def test_CipherFactoryRewrite_nobox(self):
     #     files = ["CryptoManager_syn_rewrite.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_rewrite.java", "ICipherFactory.java", "ICryptoManager.java", "rewrite/", "shared/"]
     #     # files = ["CryptoManager_rewrite.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_rewrite.java", "ICipherFactory.java", "ICryptoManager.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "CipherFactory_nobox/" + s, files)
+    #     files = ["CipherFactory_nobox/" + s for s in files]
     #     inline = 2
     #     unroll = 9
     #     self.__test(files, inline, unroll)
@@ -214,14 +215,14 @@ def test_SuffixArrayRewrite(self):
     # def test_KafkaRewrite(self):
     #     files = ["JCECipher_syn_rewrite.java", "OpenSSLCipher_syn_rewrite.java", "CipherFactory.java", "ICipher_rewrite.java", "Tester.java", "rewrite/", "shared/"]
     #     # files = ["OpenSSLCipher_syn_rewrite", "JCECipher_syn_rewrite.java", "ICipher.java", "Tester.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "Kafka/" + s, files)
+    #     files = ["Kafka/" + s for s in files]
     #     inline = 2
     #     unroll = 35
     #     self.__test(files, inline, unroll)
 
     # def test_KafkaRewrite_nobox(self):
     #     files = ["JCECipher_syn_rewrite.java", "OpenSSLCipher_syn_rewrite.java", "CipherFactory.java", "ICipher_rewrite.java", "Tester.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "Kafka_nobox/" + s, files)
+    #     files = ["Kafka_nobox/" + s for s in files]
     #     inline = 2
     #     unroll = 35
     #     # inline = 1
@@ -230,7 +231,7 @@ def test_SuffixArrayRewrite(self):
 
     # def test_EasyCSVRewrite(self):
     #     files = ["CsvDocument_syn.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "EasyCSV/" + s, files)
+    #     files = ["EasyCSV/" + s for s in files]
     #     inline = 3
     #     unroll = 5
     #     # self.__test(files, inline, unroll, True)
@@ -239,7 +240,7 @@ def test_SuffixArrayRewrite(self):
     # def test_RomListRewrite(self):
     #     files = ["RomlistParser_syn_rewrite.java", "RomlistGame.java", "Tester.java", "rewrite/", "shared/"]
     #     # files = ["RomlistParser_rewrite.java", "RomlistGame.java", "Tester.java", "rewrite/", "shared/"]
-    #     files = map(lambda s: "RomList/" + s, files)
+    #     files = ["RomList/" + s for s in files]
     #     inline = 2
     #     unroll = 26
     #     # unroll = 19
@@ -248,7 +249,7 @@ def test_SuffixArrayRewrite(self):
 
     # def test_ComparatorRewrite(self):
     #     files = ["CommunicationWithFiles_syn_rewrite.java", "Comparator_rewrite.java", "Tester.java", "rewrite/", "shared/"] 
-    #     files = map(lambda s: "Comparator/" + s, files)
+    #     files = ["Comparator/" + s for s in files]
     #     inline = 2
     #     unroll = 10
     #     self.__test(files, inline, unroll, True)            
diff --git a/test/test_benchmark_axioms.py b/test/test_benchmark_axioms.py
index fbcff67..1a77146 100644
--- a/test/test_benchmark_axioms.py
+++ b/test/test_benchmark_axioms.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from functools import reduce
 import os
 import unittest
 import csv
@@ -14,7 +16,7 @@
 
 class TestJava(TestCommon):
     def __test(self, fs, inline, unroll, adp_conc=False, arr=32):
-        _fs = map(lambda f: os.path.join(tests, f), fs)
+        _fs = [os.path.join(tests, f) for f in fs]
         if adp_conc:
             ret = java_sk.main.translate(prg=_fs, log_lvl='30', lib=False, opts=["--bnd-inline-amnt", str(inline), "--bnd-unroll-amnt", str(unroll), "--bnd-arr-size", str(arr), "--slv-timeout",  "10", "--slv-randassign", "--slv-simple-inputs"])
         else:
@@ -71,7 +73,7 @@ def test_runModels(self):
             (self.run_CipherFactoryModel, 'CipherFactoryTests'),
             (self.run_KafkaModel, 'Kafka_Tester')                
         ]
-        results = map(lambda x: [x], reduce(lambda x,y: x + y, self.run_tests(modelTests, [])))
+        results = [[x] for x in reduce(lambda x,y: x + y, self.run_tests(modelTests, []))]
         writer.writerows(results)
         modelResults.close()
 
@@ -90,62 +92,62 @@ def test_runRewrites(self):
             (self.run_CipherFactoryRewrite, 'CipherFactoryTests'),
             (self.run_KafkaRewrite, 'Kafka_Tester')
         ]
-        results = map(lambda x: [x], reduce(lambda x,y: x + y, self.run_tests(rewriteTests, [])))
+        results = [[x] for x in reduce(lambda x,y: x + y, self.run_tests(rewriteTests, []))]
         writer.writerows(results)
         modelResults.close()
             
     def run_SuffixArrayModel(self):
         files = ["SuffixArray_loops.java", "SuffixArrayTest.java", "model/"]        
-        files = map(lambda s: "SuffixArray/" + s, files)
+        files = ["SuffixArray/" + s for s in files]
         inline = 2
         unroll = 8
         return self.__test(files, inline, unroll)
         
     def run_SuffixArrayRewrite(self):
         files = ["SuffixArray_loops.java", "SuffixArrayTest.java", "rewrite/"]        
-        files = map(lambda s: "SuffixArray/" + s, files)
+        files = ["SuffixArray/" + s for s in files]
         inline = 2
         unroll = 8
         return self.__test(files, inline, unroll)
         
     def run_HashMap1Model(self):
         files = ["HashTable_loops.java", "HashTableNode.java", "HashTableTest.java", "model/", "shared/"]
-        files = map(lambda s: "HashMap1/" + s, files)
+        files = ["HashMap1/" + s for s in files]
         inline = 3
         unroll = 13
         return self.__test(files, inline, unroll)
         
     def run_HashMap1Rewrite(self):
         files = ["HashTable_loops.java", "HashTableNode.java", "HashTableTest.java", "rewrite/", "shared/"]
-        files = map(lambda s: "HashMap1/" + s, files)
+        files = ["HashMap1/" + s for s in files]
         inline = 3
         unroll = 13
         return self.__test(files, inline, unroll)
 
     def run_HashMap2Model(self):
         files = ["Bucketing_syn.java", "BucketingTest.java", "HashTable.java", "Pair.java", "model/", "shared/"]
-        files = map(lambda s: "HashMap2/" + s, files)
+        files = ["HashMap2/" + s for s in files]
         inline = 1
         unroll = 11
         return self.__test(files, inline, unroll)
         
     def run_HashMap2Rewrite(self):
         files = ["Bucketing_syn.java", "BucketingTest.java", "HashTable.java", "Pair.java", "rewrite/", "shared/"]
-        files = map(lambda s: "HashMap2/" + s, files)
+        files = ["HashMap2/" + s for s in files]
         inline = 1
         unroll = 11 #2
         return self.__test(files, inline, unroll)
 
     def run_EasyCSVModel(self):
         files = ["CsvDocument_syn.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "model/", "shared/"]
-        files = map(lambda s: "EasyCSV/" + s, files)
+        files = ["EasyCSV/" + s for s in files]
         inline = 3
         unroll = 5
         return self.__test(files, inline, unroll)
 
     def run_EasyCSVRewrite(self):
         files = ["CsvDocument_syn.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "rewrite/", "shared/"]
-        files = map(lambda s: "EasyCSV/" + s, files)
+        files = ["EasyCSV/" + s for s in files]
         inline = 3
         unroll = 5
         # return self.__test(files, inline, unroll, True)
@@ -153,7 +155,7 @@ def run_EasyCSVRewrite(self):
 
     def run_RomListModel(self):
         files = ["RomlistParser_syn_model.java", "RomlistGame.java", "Tester.java", "model/", "shared/"]
-        files = map(lambda s: "RomList/" + s, files)
+        files = ["RomList/" + s for s in files]
         inline = 2
         unroll = 26
         return self.__test(files, inline, unroll, True)
@@ -161,7 +163,7 @@ def run_RomListModel(self):
     def run_RomListRewrite(self):
         files = ["RomlistParser_syn_rewrite.java", "RomlistGame.java", "Tester.java", "rewrite/", "shared/"]
         # files = ["RomlistParser_rewrite.java", "RomlistGame.java", "Tester.java", "rewrite/", "shared/"]
-        files = map(lambda s: "RomList/" + s, files)
+        files = ["RomList/" + s for s in files]
         inline = 2
         unroll = 26
         # unroll = 19
@@ -170,7 +172,7 @@ def run_RomListRewrite(self):
 
     def run_ComparatorModel(self):
         files = ["CommunicationWithFiles_syn_model.java", "Comparator_model.java", "Tester.java", "model/", "shared/"]
-        files = map(lambda s: "Comparator/" + s, files)
+        files = ["Comparator/" + s for s in files]
         inline = 2
         unroll = 10
         return self.__test(files, inline, unroll, True, 50)
@@ -179,7 +181,7 @@ def run_ComparatorModel(self):
     def run_ComparatorRewrite(self):
         files = ["CommunicationWithFiles_syn_rewrite.java", "Comparator_rewrite.java", "Tester.java", "rewrite/", "shared/"] 
         # files = ["CommunicationWithFiles_rewrite.java", "Comparator_rewrite.java", "Tester.java", "rewrite/", "shared/"] 
-        files = map(lambda s: "Comparator/" + s, files)
+        files = ["Comparator/" + s for s in files]
         inline = 2 #2
         unroll = 10 #10
         return self.__test(files, inline, unroll, True)
@@ -187,7 +189,7 @@ def run_ComparatorRewrite(self):
 
     def run_PasswordManagerModel(self):
         files = ["Cryptographer_syn_model.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "model/", "shared/"]
-        files = map(lambda s: "PasswordManager/" + s, files)
+        files = ["PasswordManager/" + s for s in files]
         inline = 2
         unroll = 16
         return self.__test(files, inline, unroll)
@@ -195,14 +197,14 @@ def run_PasswordManagerModel(self):
     def run_PasswordManagerRewrite(self):
         files = ["Cryptographer_syn_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
         # files = ["Cryptographer_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
-        files = map(lambda s: "PasswordManager_nobox/" + s, files)
+        files = ["PasswordManager_nobox/" + s for s in files]
         inline = 2
         unroll = 16
         return self.__test(files, inline, unroll)
         
     def run_CipherFactoryModel(self):
         files = ["CryptoManager_syn_model.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_model.java", "ICipherFactory.java", "ICryptoManager.java", "model/", "shared/"]
-        files = map(lambda s: "CipherFactory/" + s, files)
+        files = ["CipherFactory/" + s for s in files]
         inline = 2
         unroll = 9
         return self.__test(files, inline, unroll)
@@ -210,21 +212,21 @@ def run_CipherFactoryModel(self):
     def run_CipherFactoryRewrite(self):
         files = ["CryptoManager_syn_rewrite.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_rewrite.java", "ICipherFactory.java", "ICryptoManager.java", "rewrite/", "shared/"]
         # files = ["CryptoManager_rewrite.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_rewrite.java", "ICipherFactory.java", "ICryptoManager.java", "rewrite/", "shared/"]
-        files = map(lambda s: "CipherFactory_nobox/" + s, files)
+        files = ["CipherFactory_nobox/" + s for s in files]
         inline = 2
         unroll = 9
         return self.__test(files, inline, unroll)
 
     def run_KafkaModel(self):
         files = ["JCECipher_syn.java", "OpenSSLCipher_syn.java", "CipherFactory.java", "ICipher_model.java", "Tester.java", "model/", "shared/"]
-        files = map(lambda s: "Kafka/" + s, files)
+        files = ["Kafka/" + s for s in files]
         inline = 2
         unroll = 35
         return self.__test(files, inline, unroll)
 
     def run_KafkaRewrite(self):
         files = ["JCECipher_syn_rewrite.java", "OpenSSLCipher_syn_rewrite.java", "CipherFactory.java", "ICipher_rewrite.java", "Tester.java", "rewrite/", "shared/"]
-        files = map(lambda s: "Kafka_nobox/" + s, files)
+        files = ["Kafka_nobox/" + s for s in files]
         inline = 2
         unroll = 35
         # inline = 1
diff --git a/test/test_big_benchmark_axioms.py b/test/test_big_benchmark_axioms.py
index 0707dd5..04e4f00 100644
--- a/test/test_big_benchmark_axioms.py
+++ b/test/test_big_benchmark_axioms.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from functools import reduce
 import os
 import unittest
 import csv
@@ -15,7 +17,7 @@
 
 class TestJava(TestCommon):
     def __test(self, fs, inline, unroll, adp_conc=False, arr=32, cbits=-1, irange=-1):
-        _fs = map(lambda f: os.path.join(tests, f), fs)
+        _fs = [os.path.join(tests, f) for f in fs]
         options = ["--bnd-inline-amnt", str(inline), "--bnd-unroll-amnt", str(unroll), "--bnd-arr-size", str(arr), "--slv-timeout", str(timeout)] 
         if adp_conc:
             options += ["--slv-randassign", "--slv-simple-inputs"]
@@ -91,7 +93,7 @@ def test_runModels(self):
             # (self.run_PasswordManagerModel, 'PasswordManagerTest'),
             # (self.run_KafkaModel, 'Kafka_Tester')                
         ]
-        results = map(lambda x: [x], reduce(lambda x,y: x + y, self.run_tests(modelTests, [], tmp_output)))
+        results = [[x] for x in reduce(lambda x,y: x + y, self.run_tests(modelTests, [], tmp_output))]
         writer.writerows(results)
         modelResults.close()
 
@@ -111,63 +113,63 @@ def test_runRewrites(self):
             # (self.run_PasswordManagerRewrite, 'PasswordManagerTest'),
             # (self.run_KafkaRewrite, 'Kafka_Tester')
         ]
-        results = map(lambda x: [x], reduce(lambda x,y: x + y, self.run_tests(rewriteTests, [], tmp_output)))
+        results = [[x] for x in reduce(lambda x,y: x + y, self.run_tests(rewriteTests, [], tmp_output))]
         writer.writerows(results)
         tmp_output.close()
         modelResults.close()
         
     def run_SuffixArrayModel(self):
         files = ["SuffixArray_loops2.java", "SuffixArrayTest.java", "model/"]        
-        files = map(lambda s: "SuffixArray_bigger/" + s, files)
+        files = ["SuffixArray_bigger/" + s for s in files]
         inline = 3
         unroll = 8
         return self.__test(files, inline, unroll)
         
     def run_SuffixArrayRewrite(self):
         files = ["SuffixArray_loops2.java", "SuffixArrayTest.java", "rewrite/"]        
-        files = map(lambda s: "SuffixArray_bigger/" + s, files)
+        files = ["SuffixArray_bigger/" + s for s in files]
         inline = 3
         unroll = 8
         return self.__test(files, inline, unroll)
         
     def run_HashMap1Model(self):
         files = ["HashTable_loops.java", "HashTableNode.java", "HashTableTest.java", "model/", "shared/"]
-        files = map(lambda s: "HashMap1_bigger/" + s, files)
+        files = ["HashMap1_bigger/" + s for s in files]
         inline = 1
         unroll = 5
         return self.__test(files, inline, unroll, irange=43)
         
     def run_HashMap1Rewrite(self):
         files = ["HashTable_loops.java", "HashTableNode.java", "HashTableTest.java", "rewrite/", "shared/"]
-        files = map(lambda s: "HashMap1_bigger/" + s, files)
+        files = ["HashMap1_bigger/" + s for s in files]
         inline = 1
         unroll = 5
         return self.__test(files, inline, unroll, irange=43)
 
     def run_HashMap2Model(self):
         files = ["Bucketing_syn.java", "BucketingTest.java", "HashTable.java", "Pair.java", "model/", "shared/"]
-        files = map(lambda s: "HashMap2_bigger/" + s, files)
+        files = ["HashMap2_bigger/" + s for s in files]
         inline = 1
         unroll = 2
         return self.__test(files, inline, unroll, cbits=2, irange=8)
         
     def run_HashMap2Rewrite(self):
         files = ["Bucketing_syn.java", "BucketingTest.java", "HashTable.java", "Pair.java", "rewrite/", "shared/"]
-        files = map(lambda s: "HashMap2_bigger/" + s, files)
+        files = ["HashMap2_bigger/" + s for s in files]
         inline = 1
         unroll = 2
         return self.__test(files, inline, unroll, cbits=2, irange=8)
 
     def run_EasyCSVModel(self):
         files = ["CsvDocument_syn.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "model/", "shared/"]
-        files = map(lambda s: "EasyCSV_bigger/" + s, files)
+        files = ["EasyCSV_bigger/" + s for s in files]
         inline = 3
         unroll = 5
         return self.__test(files, inline, unroll)
 
     def run_EasyCSVRewrite(self):
         files = ["CsvDocument_syn.java", "CodeAssertion.java", "CsvColumn.java", "CsvColumnTest.java", "CsvConfiguration.java", "CsvDocumentTest.java", "CsvRow.java", "CsvRowTest.java", "Tester.java", "rewrite/", "shared/"]
-        files = map(lambda s: "EasyCSV_bigger/" + s, files)
+        files = ["EasyCSV_bigger/" + s for s in files]
         inline = 3
         unroll = 5
         # return self.__test(files, inline, unroll, True)
@@ -175,7 +177,7 @@ def run_EasyCSVRewrite(self):
 
     def run_RomListModel(self):
         files = ["RomlistParser_syn_rewrite.java", "RomlistGame.java", "Tester.java", "model/", "shared/"]
-        files = map(lambda s: "RomList_bigger/" + s, files)
+        files = ["RomList_bigger/" + s for s in files]
         inline = 2
         unroll = 26
         return self.__test(files, inline, unroll, True)
@@ -183,7 +185,7 @@ def run_RomListModel(self):
     def run_RomListRewrite(self):
         files = ["RomlistParser_syn_rewrite.java", "RomlistGame.java", "Tester.java", "rewrite/", "shared/"]
         # files = ["RomlistParser_rewrite.java", "RomlistGame.java", "Tester.java", "rewrite_bigger/", "shared/"]
-        files = map(lambda s: "RomList_bigger/" + s, files)
+        files = ["RomList_bigger/" + s for s in files]
         inline = 2
         unroll = 26
         # unroll = 19
@@ -193,7 +195,7 @@ def run_RomListRewrite(self):
     def run_ComparatorModel(self):
         files = ["CommunicationWithFiles_syn_rewrite.java", "Comparator_rewrite.java", "Tester.java", "model/", "shared/"] 
         # files = ["CommunicationWithFiles_syn_model.java", "Comparator_model.java", "Tester.java", "model/", "shared/"]
-        files = map(lambda s: "Comparator_bigger/" + s, files)
+        files = ["Comparator_bigger/" + s for s in files]
         inline = 2
         unroll = 10
         return self.__test(files, inline, unroll, True)
@@ -202,7 +204,7 @@ def run_ComparatorModel(self):
     def run_ComparatorRewrite(self):
         files = ["CommunicationWithFiles_syn_rewrite.java", "Comparator_rewrite.java", "Tester.java", "rewrite/", "shared/"] 
         # files = ["CommunicationWithFiles_rewrite.java", "Comparator_rewrite.java", "Tester.java", "rewrite/", "shared_bigger/"] 
-        files = map(lambda s: "Comparator_bigger/" + s, files)
+        files = ["Comparator_bigger/" + s for s in files]
         inline = 2 #2
         unroll = 10 #10
         return self.__test(files, inline, unroll, True)
@@ -210,7 +212,7 @@ def run_ComparatorRewrite(self):
 
     def run_PasswordManagerModel(self):
         files = ["Cryptographer_syn_model.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "model/", "shared/"]
-        files = map(lambda s: "PasswordManager_bigger/" + s, files)
+        files = ["PasswordManager_bigger/" + s for s in files]
         inline = 2
         unroll = 16
         return self.__test(files, inline, unroll)
@@ -218,35 +220,35 @@ def run_PasswordManagerModel(self):
     def run_PasswordManagerRewrite(self):
         files = ["Cryptographer_syn_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
         # files = ["Cryptographer_rewrite.java", "PasswordManager_syn.java", "PasswordMap.java", "PasswordManagerTest.java", "rewrite/", "shared/"]
-        files = map(lambda s: "PasswordManager_bigger/" + s, files)
+        files = ["PasswordManager_bigger/" + s for s in files]
         inline = 2
         unroll = 16
         return self.__test(files, inline, unroll)
         
     def run_CipherFactoryModel(self):
         files = ["CryptoManager_syn_model.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_model.java", "ICipherFactory.java", "ICryptoManager.java", "model/", "shared/"]
-        files = map(lambda s: "CipherFactory_bigger/" + s, files)
+        files = ["CipherFactory_bigger/" + s for s in files]
         inline = 3
         unroll = 9
         return self.__test(files, inline, unroll)
     
     def run_CipherFactoryRewrite(self):
         files = ["CryptoManager_syn_rewrite.java", "CipherFactoryTester.java", "ConfigurableCipherFactory.java", "DefaultCipherFactory_rewrite.java", "ICipherFactory.java", "ICryptoManager.java", "rewrite/", "shared/"]
-        files = map(lambda s: "CipherFactory_bigger/" + s, files)
+        files = ["CipherFactory_bigger/" + s for s in files]
         inline = 3
         unroll = 9
         return self.__test(files, inline, unroll)
 
     def run_KafkaModel(self):
         files = ["JCECipher_syn.java", "OpenSSLCipher_syn.java", "CipherFactory.java", "ICipher_model.java", "Tester_model.java", "model/", "shared/"]
-        files = map(lambda s: "Kafka_biggest/" + s, files)
+        files = ["Kafka_biggest/" + s for s in files]
         inline = 2
         unroll = 35
         return self.__test(files, inline, unroll)
 
     def run_KafkaRewrite(self):
         files = ["JCECipher_syn_rewrite.java", "OpenSSLCipher_syn_rewrite.java", "CipherFactory.java", "ICipher_rewrite.java", "Tester_rewrite.java", "rewrite/", "shared/"]
-        files = map(lambda s: "Kafka_biggest/" + s, files)
+        files = ["Kafka_biggest/" + s for s in files]
         inline = 2
         unroll = 35
         # inline = 1
diff --git a/test/test_erroneous.py b/test/test_erroneous.py
index c60515c..225308e 100644
--- a/test/test_erroneous.py
+++ b/test/test_erroneous.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import unittest
 
@@ -27,7 +28,7 @@ def test_mains(self):
 
   def __test(self, fs):
     append_b = lambda f: os.path.join(benchmarks, f)
-    _fs = map(append_b, fs)
+    _fs = [append_b(f) for f in fs]
     ret = java_sk.main.main(_fs)
     self.assertNotEqual(ret, 0)
 
diff --git a/test/test_java.py b/test/test_java.py
index f2ff08a..6600526 100644
--- a/test/test_java.py
+++ b/test/test_java.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from __future__ import print_function
 import os
 import unittest
 
@@ -15,10 +17,10 @@ class TestJava(TestCommon):
 
   def __test(self, fs, using_model=False):
     append_b = lambda f: os.path.join(benchmarks, f)
-    _fs = map(append_b, fs)
+    _fs = [append_b(f) for f in fs]
     if using_model:
       _fs.extend(java_sk.util.get_files_from_path(model_dir, "java"))
-    print fs
+    print(fs)
     ret = java_sk.main.main(_fs, '30')
     self.assertEqual(ret, 0)
 
diff --git a/test/test_java_precisely.py b/test/test_java_precisely.py
index 9956e2f..5d600c2 100644
--- a/test/test_java_precisely.py
+++ b/test/test_java_precisely.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import unittest
 
@@ -12,7 +13,7 @@ class TestMini(TestCommon):
 
   def __test(self, fs):
     append_b = lambda f: os.path.join(jp, f)
-    _fs = map(append_b, fs)
+    _fs = [append_b(f) for f in fs]
     ret = java_sk.main.main(_fs)
     self.assertEqual(ret, 0)
 
diff --git a/test/test_lib.py b/test/test_lib.py
index ab699ad..ef4cdbd 100644
--- a/test/test_lib.py
+++ b/test/test_lib.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import unittest
 
@@ -10,7 +11,7 @@
 
 class TestJava(TestCommon):
     def __test(self, fs):
-        _fs = map(lambda f: os.path.join(tests, f), fs + ['../../model/'])
+        _fs = [os.path.join(tests, f) for f in fs + ['../../model/']]
         ret = java_sk.main.main(_fs, '30')
         self.assertEqual(ret, 0)
 
diff --git a/test/test_mini.py b/test/test_mini.py
index e743edd..c1f4bbb 100644
--- a/test/test_mini.py
+++ b/test/test_mini.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import unittest
 
@@ -10,7 +11,7 @@
 class TestMini(TestCommon):
 
   def __test(self, fs):
-    _fs = map(lambda f: os.path.join(benchmarks, f), fs)
+    _fs = [os.path.join(benchmarks, f) for f in fs]
     ret = java_sk.main.main(_fs, '30')
     self.assertEqual(ret, 0)
 
diff --git a/test/test_new_ast.py b/test/test_new_ast.py
index 98d4b87..564fc99 100644
--- a/test/test_new_ast.py
+++ b/test/test_new_ast.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 import os
 import unittest
 
@@ -10,7 +11,7 @@
 
 class TestJava(TestCommon):
     def __test(self, fs):
-        _fs = map(lambda f: os.path.join(tests, f), fs)
+        _fs = [os.path.join(tests, f) for f in fs]
         ret = java_sk.main.main(_fs, '30')
         self.assertEqual(ret, 0)