Refactor pre commits