Add abstract factory pattern