Make role diff functions and plugin attribs more generic