Improve comments

Parsing error message
Complete implementation of canonicalize

Returns a canonical constraint.

Some dead code was removed in externalizeTypes
Add a note
Add test files
Add a note
Remove unused function