Adapt to libnpa, implement System, add few stubs