Added factory, observer and adapter pattern implementations.