Refactoring unification data structure.
Trying for better unification style, but there seems to be a non-trivial perf-hit.
Fixing excessive object creation.
A minor performance tweak.