Initial implementation of NMF