slight refactoring of cards and templates, trying to fix grid display