Somewhat cleaner code for getting a media container