Avoided the usage of Window object inside the code