cleanup and comments, and example of handling mr gaze settings.