Update apidoc and code