Small visual changes in detail view
Removed an unused function
If query result changes, and the selected card is no longer part of the selection, select the first card