Refactoring PicCard logic