[WIP] Selector API

Work in progress for the Selector API. I'll add a to-do ASAP.