added clustering crossvalidation; refactoring clustering module