Add support for class member variable

supersedes #1417
Hmmm... I doubt that is it. I don't see how adding an extra method would help.