MVC pattern implementation