Edited 1D minimization rebracketing logic.
Added several new test cases.