Changes implements to class dectorator and made importing psycopyg2 to relative import to work with python 3.4