Added sort functionality to cards
Separated patterns stuff from general admin stuff