Understanding the MVVM pattern