Add traits and generics