localizing-variables

Declare variables in smallest possible scope, initialize close to first use, minimize span and live time