Move the select logic around, start preparing to fix up delete