global refactoring continued

NOT WORKED COPY