PEP8, imports, fix to media.py: tuples are immutable, removed api.py util.py