Updated TemplateHaskell modules to work with type aliases (to a limited extent).
Removed extra dollar signs
First draft of canonicalization.