Legacy code modernization