Bring the master branch up-to-date with NMS

Without NMS code