Documenting and reworking an old script