Cleaned up the media filtering.