Refactor job processing into separate method