More cleanup of client code