Cards are now properly sorted before being displayed. Minor improvements.