Generalized the Syntax.transform helper function
Added a simple simplifier function to Syntax
Top-level simplifies types and definitions