Fixed issue with media spawning more than one file
Optimized speed