change OpenCamera to OpenCameraByID,clean up some code