Spec for Registry and small performance improvement.