WIP on new selection algorithms
Refactoring