Made Media serializable
Updated version