Client prototype. Needs clean up.