Move feature detection to highest scope in module. Event variable rename...

....