Initial import of v1 client code.