Refactoring camera

Initial refactoring of the camera