revised python3 cleanup