Fixed TODO in card.js, refactored getUrl and getName functions