Do not declare variables at the beginning of a block/function but only when they are first needed (unless they need to leave their scope).