some code cleanup in CameraPreview and added previewcallback in ChatFragment