Revert "use i, j, l as ref closures"

This reverts commit 62c0dc5f8886db7485ba66c3232ab1e2ce0f6ef6.