Make job states coherent and avoid using hardcoded names