Add support for class member variable

supersedes #1417
Long line (we use 80 columns) here and below.