CardPage: replace switch statement with dictionary for simplicity