Abstract Factory Pattern-small refactor