Initial version.
Fixed a bug with retrieving the correct model for a pair of groups in certain situations.
Updated documentation.