Restructure and generalize tuple accessors.