Refactoring debug and deco