remove some unused code and some simplications to writeJobInfo method