Main code can now collect images. bug to fix: video stream freezes occasionally