Updated modules for Python 3 and added subclasses