Fixed type lookup: types were looked up from "self", but they should be looked up from the matching def.
Some type inference code cleanup (removed a constructor with 12 arguments)
Make Tuple enumerable with a little trick (will do better in the future)
Use tuples instead of arrays in some places