Implementation of some design patterns.