Improved scope management in some files.

Removed some more useless stuff