refactoring deck MVC architecture