Hacking the api so that the client is visible. This all needs tidying up