Creating new objects within generics