Clean up spawn method to use entity class registry.