Reduce variable scope