cleanup and modernization