remove window dependency from module definitions