Python 3 cleanup