Compressing redundant nodes in the Fortre and adding a unit test.