Revised the data structure for jobs. Handle Ctrl-D signal