minot refactoring