Added example with chain of responsibility and factory patterns.