Making the (action, element) tuple a namedtuple