Better registry implementation.