Move variable to block where it's used