MOG history added, ROI writing streamlined, needs to be checked