Add factory patterns.