Refactoring media package