Bring variable declarations closer to where they're first used.