cleaned up nodal_roles, added tests