Python3 fixes, Some functionality is lost. Still restructuring.