We should join this var statements, and maybe move them to the top of the function too.