Patch/refactor