Added canonicalizing and removed some comments.
Added constants file and made corresponding changes.