added flatten.py, added unicode fix for team names