Fix K+R reverse optimization NPE
Introduce maxPreTransitDistance parameter
Fix whitespace