[midnight optimizations] lift constants out
make sure identifiers are lifted above check blocks
modernize range, and nothing-ify each