Refactor media object helpers