copied Selector files from wsCore.