multiple handling files for audio and video, clean up code