Simplify CardsPager code