Understanding the MVC pattern