Abstract factory implementation