More work on the client, trying to rfractor stuff into other stuff.