Implement selectors

https://gist.github.com/kenzierocks/80d714dc1910719038c5

`getArgumentMap` is the replacement for your arg-parsing stuff, adapt it to your needs. the `main` function is just a test.