WIP - basic support for namespaces, but there's a lot more work to do here