Refactor. Use the MVC model