camera: Refactored camera into a class + reduce global variables.