Canonicalization implemented. Tests are good.