Decorator pattern  and some refactoring to other package