Refactor rake