Added second veriant of cluster (for tree).
Add docs, some refactorings.
Fixed bug with wrong number of clusters.
Implement adjMatrix function to generate topology matrix.