refactorings, mostly renaming in the caption creation code