Patcher refactoring