Added comments to registry.go and rounded out the test coverage.