I've implemented a fix for the schema generation part and added that implementation to the pull request.
I try to work on a fix for the removal part. I think it should be similar to the fix for