Completed move of functions to client.scm