Moving client out of CLI