Cleaning up code relating to tag testing in roles