Introduce selection concept.
Added tests.