Move all camera-related code to a single client-side class