Cleanup instance and media class