Move feature detection scope tohighest scope in module. Event variable rename.