Starting to clean up the client code.