Replacing long tuples with namedtuple