Refactored a bunch of camera code.