Ability to define threshold distance for clusters consolidation + small javadoc