Get selection and expansion working