Another try

Not tests for all the different select_*. But one is more than none (i don't have time to write more tests for the others).

Also a bit better diffs now. One can follow the changes a bit better.