Refactor to nx3.elements