Minor optimizations to datatypes, revert to checkClash not mod eq.  Minor clean up.