Client discovery + basic light API

Restructured version of #8, wherein @radar made magic.