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