Changes to implement MVC