Refactored some code concerning media loading. We now only do it once.