Improved camera code.