Refactoring and type match corrections in Semantics and Syntax.