Eliminate final use of element_at function