automatically hide model class input if needed.
Fixes #837: turn private variables into public ones.