Initial import of nxapi, still WIP