Finished migration from python 2 to 3