Fix hardcoded namespaces

Removed a lot of .NET code that could (and should) be handled with XPath. Should fix #104.