Move client functions to client.scm