moved roles near the objects that use them
extracted new role for state discovery
extracted new role for state discovery