Added MVC pattern to M4