Refactored cards into seperate functions