Partial implementation of possible-full-isomorphism-detection algorithm.
Refactoring.