add COMPACT_JOB which utilize the same job structure for consecutive similar jobs, and fixed bugs