Improvement to PLDAMachine + add more tests (close #167)