various type system & DSL enhancements