Implementation of the MVC pattern