Implemented multiclass CSP.

It is not clear how to optimally select components in the multiclass case.
This will require some further investigation...