Deep refactoring. Decorator pattern added