update media and cleanup test code