PY3: Updated typesystem wto be python 3 compatible