Porting libnnt to new approach