Made the instance module findbugs-bugs free

@Mehmet can you have a look at the equals/hash code implementation that have been added to make findbugs happy. Can this cause problems?