Switching to view model pattern