Implementation of MVC design pattern