fix bug in cases, factor out tc-cases, add support for cases-else
adding more things to env: some, none, fold, map2, and clean up error formatting