Further elegantization of triples.lua