Use a factory pattern to create registry item objects