dev: refactor classes that took lists of triangles to take a map instead