WIP: improve iterations in KPM
This commit closes #88 (closed) by fixing the behaviour of odd number of modes, and the unnecessary extra iterations.
This commit closes #88 (closed) by fixing the behaviour of odd number of modes, and the unnecessary extra iterations.