Refactor Abstract Factory Design pattern