First update of the Selection code (need to erase some old code)