Refactor job hooks