When building term take into account the expected type.
Fix compilation bug causing methods to appear in all constructors. Fix issue with term building.