Adjust code framework and add code for camera module