Added removeMedia() function to remove a media element from the model.