First cut of control API
Further work on control hub api and rudimentary command line client.