Refactoring inject viewmodel