Added generics to Abstract Factory