Cleanup of media.js