Cleaned up some redundant code from cards.js