Keep the sexp for the document up to date during scan / change, instead of having a separate step.
De-clutter the source directories a bit. Ensure tests build with meson, and remove from autotools in a few places (no need to do things twice).