Reduced scope of some variables