Refactor BaseViewModel.