some more vars generalized

Some other variables that have to be generalized to get it smoothly working for Ju and others. @kalbermattenm: could you please review and comment. thanks