tidy up the camera block code