NMI was bugfexed and tested. Purity was also tested.