Remove unused code, use a namedtuple