Add support for class member variable

supersedes #1417
The code uses the token, I'll update to set to null here.