test $if, begin to test pairs-and-lists and environments, other fixes