refactoring on job management.