Improved scoping, structure