Added support for an arbitrary number of clusterings.