python 2/3 metaclass definition & little insignificant bugfixes