Refactored Camera Code.