Refactored code for better property accesing of contents of a card.