reorganize types to allow better type env, names that resolve to record types, etc
add methods on Number