Added support for namespaces (personal use, no guarantees)