Fixed PMF NuML writer; refactored tests