added InitializeOnLoad attribute to be used with assemblies being loaded.
Cleaned up code for stylecop