fixes on the namespace refs and move around the event trigger to work on windows and non-windows platforms.