COntinued refactoring of diff package
Added javadoc and added some generics