Change file hierarchy and tidy up DifferenceFactory