`var index =` is unused. likely a left over code from an earlier revision of this commit.