Refactor cards remaining feature