Client code complete (I think)