Refactor Monkey Patcher.