Made nmf more testable, some paper edits