Added threading for camera and timer.