This line is pretty dense. Could some of the pieces here be extracted into variables or similar?