GPII-153: A few repetitions removed by using local variables.