Refactoring refreshCards