moved some things around
moved now unused nl_selectionset to comments in selectionset.  started on key logic