More bug fixes and tests.
Split the namespace descriptor resolver module up.