Improved Media and MediaInterface code