style nit: can you move all of these var declarations to their first use?