Table manipulations and selection

Use #637 to detect selection and deselect if detected.