Minor refactoring of integer program.