inheritance and generics

added generics and multiple inheritance

core refactor incomplete