Python 3 support

Work in progress currently