Refactor: Introduce MVC pattern