Refined Card code and made a test for cards from the deck