minot code cleanup