Introduce accessor method for global window object
Refactorings