Implementation of the decorator pattern.