Refactored the camera activity.