Add tests for NamespaceContext with changes to the class to match spec.
Also change base storage from list to array.