Add support for class member variable

supersedes #1417
I tried but got an error "ReferenceError: identifer is not defined"

I look at this in the coming, I also need to add tests for this PR