Refactor patch