Media  service refactoring