media model refactoring