streamlined some of the camera code