Implemented DeM, added more tests for it, and added another test case for Fact.getInverse