Make role work on EL 4, 5 and 7

Make the role work on EL4, EL5 and EL7 in addition to EL6.

Also includes some minor improvements.