ViewModelBase refactored and unit tested