Implemented CardTable sorting functionality.