Lot of work on selection-key creation cleanup