Refactor how server service discovery is done

This pull request makes creating service discovery selectors a bit easier.