Refactor ViewModelBase.