Modifying the software by restructuring is called
official ans was perfective maintenance which is also given in many books
in some literature preventive is also correct restructuring or documentation updates (often referred to as "preventive" maintenance)
https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nbsspecialpublication500-129.pdf