Takes a more safe approach to the err argument of the catch block in the exported method. It proves that in production the err argument may be undefined which breaks things.
Refactored the namespace support in order to make it more stable. The parser used to crash for large XML documents in an undeterministic manner (missing method errors or segmentation faults, for the same input).