Refactor modulow.