Refactor lwrp