Add selection and editing handlers