Code cleanupt in backup_image job

I was reading source code to see how backing up works exactly and noticed that it was still using hard coded states in many places. I changed that to the constants and cleaned up some long lines as well to make it easier to read.

I'm sure more cleanup is needed in this file but I only did the one job block I was interested in at the time.