Fix potential crash when name can't be bound
Clean up code
Fix type check error
Minor refactoring
Whitespace changes only
Refactoring subtyping
Minor refactoring
Fix subtyping of generic functions

Fixes #450.
Merge branch 'generic-func-subtyping2'