Fix class types.
Allow all possible pairs.
Improve functionality.