Refactor cards