Refactored CardController