Port to new libnpa