strip last dregs of media-related code