abstract classes changed to interfaces
changed extended classes to implement generic interfaces
implemented handling of interface based classes
cleaned up compare method