fixed bugs around ids of bound vars

findByid returns Id even if Id doesn't appear in body of fun expr
replaced lookup and insert with just lookup
refactored some duplicated code for builtin functions
fixed issue with If and bound vars
make showTyp fun output prettier, normalize typ vars
created structure 'Type' and moved related functions