Convert to Python3 and cleanup