Added changes to CameraActivity, and some helper