Refactoring using decorators finished and tested