Simplify and fix client example