Better viewmodel implementation