Move camera control code to independent object