Add bounds utility. Convert distance clustering to module pattern.