did some refactoring, made it possible to stream with a webcam