Refactor camera.py and test_camera.py.