HasClusters fix and optimization. Fixes issue #64.
Merged develop.