refactoring file places; new file for media functions; starting generic function for handle media search