TypeInference: removed superfluous functions
TypeInference: fixed various warnings