Renamed variables, changed methods and corrected tests in ViewModel