mod: Reorder variable declarations for better scoping/locality