Code cleanup in multiple roles