Introduce some extra variables, reducing reliance on nth(). #27 #29