Move code to Card and Deck.