Remove references to old-style variables

Fixes #3842