(partial) support for type definition syntax, plus style cleanups
new example with a bunch of nested constructs to at least try to make testing more rigorous