Added ability to get list of ids and clear the selection.