Rebuilt nbm ... working but not thoroughly tested.