Refactoring and handling of InstanceOf, can now handle any version of NUnit