Merging nmeans process labeling

plus some other bits to get the code looking like its neighbors.

Resolves #212