Reducing the scope of variables