Subtyping for function call and assignment and other fixes.