Implementing structural design patterns