Tuple madness refactoring