Started main loop function, and implemented letting the user chose the next-video algorithm.