refactored main and now having trouble with the camera, cannot boot and connect successfully