Moved namedtuple definition