Easy refactoring on decorators.py