minor refactors of card controller