Mark's aliasing of "ifvarclass" as "if" and related improvements

This is the portion of @markburgess's development branch dealing with ifvarclass, as reindented and rebased by @ediosyncratic.