Extract viewmodel logic to services