move scritp functions
Merge from youtube-temp-db