Replace old-style variables with new ones