Merge pull request #2 from mmirman/coc

added recursive type check and unsound declarations
Merge pull request #3 from mmirman/coc

fixed soundness - it was backwards