Generics better worked out and logical operators defined